Change settings button name from Import to Import sets
This commit is contained in:
parent
852d28afcf
commit
c5a209d41e
|
@ -64,7 +64,7 @@ class _SettingsPageState extends State<_SettingsPage> {
|
||||||
{'title': 'Show Unit', 'value': settings.showUnit},
|
{'title': 'Show Unit', 'value': settings.showUnit},
|
||||||
{'title': 'Steps', 'value': settings.steps},
|
{'title': 'Steps', 'value': settings.steps},
|
||||||
{'title': 'Sound', 'value': settings.sound},
|
{'title': 'Sound', 'value': settings.sound},
|
||||||
{'title': 'Import', 'value': null},
|
{'title': 'Import sets', 'value': null},
|
||||||
{'title': 'Delete all sets', 'value': null},
|
{'title': 'Delete all sets', 'value': null},
|
||||||
]
|
]
|
||||||
.where((item) => (item['title'] as String)
|
.where((item) => (item['title'] as String)
|
||||||
|
@ -83,10 +83,10 @@ class _SettingsPageState extends State<_SettingsPage> {
|
||||||
if (item['title'] == 'Delete all sets')
|
if (item['title'] == 'Delete all sets')
|
||||||
return DeleteAllSets(mounted: mounted);
|
return DeleteAllSets(mounted: mounted);
|
||||||
|
|
||||||
if (item['title'] == 'Import')
|
if (item['title'] == 'Import sets')
|
||||||
return Center(
|
return Center(
|
||||||
child: ElevatedButton(
|
child: ElevatedButton(
|
||||||
child: const Text("Import"),
|
child: const Text("Import sets"),
|
||||||
onPressed: () async {
|
onPressed: () async {
|
||||||
final result = await FilePicker.platform.pickFiles(
|
final result = await FilePicker.platform.pickFiles(
|
||||||
type: FileType.custom,
|
type: FileType.custom,
|
||||||
|
@ -118,7 +118,7 @@ class _SettingsPageState extends State<_SettingsPage> {
|
||||||
(batch) => batch.insertAll(db.gymSets, gymSets));
|
(batch) => batch.insertAll(db.gymSets, gymSets));
|
||||||
if (!mounted) return;
|
if (!mounted) return;
|
||||||
ScaffoldMessenger.of(context).showSnackBar(
|
ScaffoldMessenger.of(context).showSnackBar(
|
||||||
const SnackBar(content: Text('Imported data')));
|
const SnackBar(content: Text('Imported sets')));
|
||||||
},
|
},
|
||||||
));
|
));
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user