Implement data sync and cleanup

This commit is contained in:
2026-01-09 13:48:38 -06:00
parent dc6bcad83f
commit d28898cb81
12 changed files with 596 additions and 50 deletions

View File

@@ -390,6 +390,27 @@ class HusbandSettingsScreen extends ConsumerWidget {
),
child: Column(
children: [
ListTile(
leading: const Icon(Icons.sync, color: Colors.blue),
title: Text('Sync Data',
style: GoogleFonts.outfit(
fontWeight: FontWeight.w500, color: Colors.blue)),
onTap: () async {
ScaffoldMessenger.of(context).showSnackBar(
const SnackBar(content: Text('Syncing data...')),
);
await ref.read(cycleEntriesProvider.notifier).syncData();
if (context.mounted) {
ScaffoldMessenger.of(context).showSnackBar(
const SnackBar(
content: Text('Sync complete'),
backgroundColor: Colors.green,
),
);
}
},
),
const Divider(height: 1),
ListTile(
leading: const Icon(Icons.cloud_download_outlined,
color: Colors.blue),