Change settings button name from Import to Import sets

This commit is contained in:
Brandon Presley 2023-11-30 10:27:23 +13:00
parent 852d28afcf
commit c5a209d41e

View File

@ -64,7 +64,7 @@ class _SettingsPageState extends State<_SettingsPage> {
{'title': 'Show Unit', 'value': settings.showUnit},
{'title': 'Steps', 'value': settings.steps},
{'title': 'Sound', 'value': settings.sound},
{'title': 'Import', 'value': null},
{'title': 'Import sets', 'value': null},
{'title': 'Delete all sets', 'value': null},
]
.where((item) => (item['title'] as String)
@ -83,10 +83,10 @@ class _SettingsPageState extends State<_SettingsPage> {
if (item['title'] == 'Delete all sets')
return DeleteAllSets(mounted: mounted);
if (item['title'] == 'Import')
if (item['title'] == 'Import sets')
return Center(
child: ElevatedButton(
child: const Text("Import"),
child: const Text("Import sets"),
onPressed: () async {
final result = await FilePicker.platform.pickFiles(
type: FileType.custom,
@ -118,7 +118,7 @@ class _SettingsPageState extends State<_SettingsPage> {
(batch) => batch.insertAll(db.gymSets, gymSets));
if (!mounted) return;
ScaffoldMessenger.of(context).showSnackBar(
const SnackBar(content: Text('Imported data')));
const SnackBar(content: Text('Imported sets')));
},
));