Updated button order

This commit is contained in:
2025-06-12 12:55:20 +02:00
parent 5f922eba3c
commit fa302f27e1
2 changed files with 32 additions and 34 deletions

View File

@@ -110,6 +110,37 @@ class _SettingsViewState extends State<SettingsView> {
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
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(
color: CustomTheme.primaryColor,
sizeStyle: CupertinoButtonSize.medium,
@@ -119,7 +150,6 @@ class _SettingsViewState extends State<SettingsView> {
TextStyle(color: CustomTheme.backgroundColor),
),
onPressed: () async {
print('Export pressed');
final success =
await LocalStorageService.exportJsonFile();
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),
),
],
));
}
}),
],
)),
)

View File

@@ -2,7 +2,7 @@ name: cabo_counter
description: "Mobile app for the card game Cabo"
publish_to: 'none'
version: 0.2.8+201
version: 0.2.8+202
environment:
sdk: ^3.5.4