Fladder/lib/screens/syncing/widgets/sync_markedfordelete.dart
PartyDonut 7b3e733b76
[Setup] Added build.yaml and check.yaml (#1)
Co-authored-by: PartyDonut <PartyDonut@users.noreply.github.com>
2024-09-21 11:59:28 +02:00

41 lines
1.4 KiB
Dart

import 'package:ficonsax/ficonsax.dart';
import 'package:fladder/models/syncing/sync_item.dart';
import 'package:fladder/util/list_padding.dart';
import 'package:flutter/material.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
class SyncMarkedForDelete extends ConsumerWidget {
final SyncedItem syncedItem;
final Widget child;
const SyncMarkedForDelete({required this.syncedItem, required this.child, super.key});
@override
Widget build(BuildContext context, WidgetRef ref) {
return Stack(
children: [
child,
if (syncedItem.markedForDelete)
Positioned.fill(
child: Card(
elevation: 0,
semanticContainer: false,
color: Colors.black.withOpacity(0.6),
child: Row(
mainAxisSize: MainAxisSize.max,
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
CircularProgressIndicator.adaptive(
strokeCap: StrokeCap.round,
valueColor: AlwaysStoppedAnimation(Theme.of(context).colorScheme.error),
),
const Text("Deleting"),
const Icon(IconsaxOutline.trash)
].addPadding(const EdgeInsets.symmetric(horizontal: 16)),
),
),
)
],
);
}
}