mirror of
https://github.com/gabehf/Fladder.git
synced 2026-03-14 09:46:01 -07:00
fix: Sync leaving left over temp files (#73)
Co-authored-by: PartyDonut <PartyDonut@users.noreply.github.com>
This commit is contained in:
parent
c5e39db9ec
commit
8d15e319d3
15 changed files with 644 additions and 406 deletions
67
lib/screens/syncing/widgets/sync_status_overlay.dart
Normal file
67
lib/screens/syncing/widgets/sync_status_overlay.dart
Normal file
|
|
@ -0,0 +1,67 @@
|
|||
import 'package:flutter/material.dart';
|
||||
|
||||
import 'package:ficonsax/ficonsax.dart';
|
||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||
|
||||
import 'package:fladder/models/syncing/sync_item.dart';
|
||||
import 'package:fladder/util/list_padding.dart';
|
||||
import 'package:fladder/util/localization_helper.dart';
|
||||
|
||||
class SyncStatusOverlay extends ConsumerWidget {
|
||||
final SyncedItem syncedItem;
|
||||
final Widget child;
|
||||
const SyncStatusOverlay({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),
|
||||
),
|
||||
Text(context.localized.syncOverlayDeleting),
|
||||
const Icon(IconsaxOutline.trash)
|
||||
].addPadding(const EdgeInsets.symmetric(horizontal: 16)),
|
||||
),
|
||||
),
|
||||
),
|
||||
if (syncedItem.syncing)
|
||||
Positioned.fill(
|
||||
child: IgnorePointer(
|
||||
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),
|
||||
),
|
||||
Text(context.localized.syncOverlaySyncing),
|
||||
const Icon(IconsaxOutline.cloud_notif)
|
||||
].addPadding(const EdgeInsets.symmetric(horizontal: 16)),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue