Merge pull request #52 from flixcoo/enhance/40-change-ex--and-import-button-order
Changed Export- and Import Button Order
This commit is contained in:
@@ -110,6 +110,37 @@ class _SettingsViewState extends State<SettingsView> {
|
|||||||
child: Row(
|
child: Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
|
CupertinoButton(
|
||||||
|
color: CustomTheme.primaryColor,
|
||||||
|
sizeStyle: CupertinoButtonSize.medium,
|
||||||
|
child: Text(
|
||||||
|
'Daten importieren',
|
||||||
|
style:
|
||||||
|
TextStyle(color: CustomTheme.backgroundColor),
|
||||||
|
),
|
||||||
|
onPressed: () async {
|
||||||
|
final success =
|
||||||
|
await LocalStorageService.importJsonFile();
|
||||||
|
if (!success && context.mounted) {
|
||||||
|
showCupertinoDialog(
|
||||||
|
context: context,
|
||||||
|
builder: (context) => CupertinoAlertDialog(
|
||||||
|
title: const Text('Fehler'),
|
||||||
|
content: const Text(
|
||||||
|
'Datei konnte nicht importiert werden.'),
|
||||||
|
actions: [
|
||||||
|
CupertinoDialogAction(
|
||||||
|
child: const Text('OK'),
|
||||||
|
onPressed: () =>
|
||||||
|
Navigator.pop(context),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
));
|
||||||
|
}
|
||||||
|
}),
|
||||||
|
const SizedBox(
|
||||||
|
width: 20,
|
||||||
|
),
|
||||||
CupertinoButton(
|
CupertinoButton(
|
||||||
color: CustomTheme.primaryColor,
|
color: CustomTheme.primaryColor,
|
||||||
sizeStyle: CupertinoButtonSize.medium,
|
sizeStyle: CupertinoButtonSize.medium,
|
||||||
@@ -119,7 +150,6 @@ class _SettingsViewState extends State<SettingsView> {
|
|||||||
TextStyle(color: CustomTheme.backgroundColor),
|
TextStyle(color: CustomTheme.backgroundColor),
|
||||||
),
|
),
|
||||||
onPressed: () async {
|
onPressed: () async {
|
||||||
print('Export pressed');
|
|
||||||
final success =
|
final success =
|
||||||
await LocalStorageService.exportJsonFile();
|
await LocalStorageService.exportJsonFile();
|
||||||
if (!success && context.mounted) {
|
if (!success && context.mounted) {
|
||||||
@@ -140,38 +170,6 @@ class _SettingsViewState extends State<SettingsView> {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
const SizedBox(
|
|
||||||
width: 20,
|
|
||||||
),
|
|
||||||
CupertinoButton(
|
|
||||||
color: CustomTheme.primaryColor,
|
|
||||||
sizeStyle: CupertinoButtonSize.medium,
|
|
||||||
child: Text(
|
|
||||||
'Daten importieren',
|
|
||||||
style:
|
|
||||||
TextStyle(color: CustomTheme.backgroundColor),
|
|
||||||
),
|
|
||||||
onPressed: () async {
|
|
||||||
print('Import pressed');
|
|
||||||
final success =
|
|
||||||
await LocalStorageService.importJsonFile();
|
|
||||||
if (!success && context.mounted) {
|
|
||||||
showCupertinoDialog(
|
|
||||||
context: context,
|
|
||||||
builder: (context) => CupertinoAlertDialog(
|
|
||||||
title: const Text('Fehler'),
|
|
||||||
content: const Text(
|
|
||||||
'Datei konnte nicht importiert werden.'),
|
|
||||||
actions: [
|
|
||||||
CupertinoDialogAction(
|
|
||||||
child: const Text('OK'),
|
|
||||||
onPressed: () =>
|
|
||||||
Navigator.pop(context),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
));
|
|
||||||
}
|
|
||||||
}),
|
|
||||||
],
|
],
|
||||||
)),
|
)),
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ name: cabo_counter
|
|||||||
description: "Mobile app for the card game Cabo"
|
description: "Mobile app for the card game Cabo"
|
||||||
publish_to: 'none'
|
publish_to: 'none'
|
||||||
|
|
||||||
version: 0.2.8+201
|
version: 0.2.9+203
|
||||||
|
|
||||||
environment:
|
environment:
|
||||||
sdk: ^3.5.4
|
sdk: ^3.5.4
|
||||||
|
|||||||
Reference in New Issue
Block a user