Implement data sync and cleanup
This commit is contained in:
@@ -620,6 +620,25 @@ class _SettingsTab extends ConsumerWidget {
|
||||
MaterialPageRoute(
|
||||
builder: (context) => const ExportDataScreen()));
|
||||
}),
|
||||
_buildSettingsTile(
|
||||
context,
|
||||
Icons.sync,
|
||||
'Sync Data',
|
||||
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 SizedBox(height: 16),
|
||||
_buildSettingsGroup(context, 'Account', [
|
||||
|
||||
Reference in New Issue
Block a user