This commit is contained in:
Sven committed 2025-09-22 12:21:40 +02:00
1 parent 304cae926e
commit 206283c2ca
2 files changed
+22 -12

No files matched your search

+21 -11
View File
@@ -463,16 +463,26 @@ bool isJobTooFarInFuture(Job job) {
}
Future<bool> taskDialogSecurityException(BuildContext context) async {
bool close = false;
final result = await showDialog<bool>(
context: context,
barrierDismissible: false,
builder: (dialogContext) {
return AlertDialog(
title: const Text('Achtung'),
content: const Text('Wenn Sie den Dialog jetzt schließen gehen erfasste Daten verloren und die Aufgabe oder Station bleibt unerledigt.'),
actions: [
TextButton(
onPressed: () => Navigator.of(dialogContext).pop(true),
child: const Text('Schließen'),
),
TextButton(
onPressed: () => Navigator.of(dialogContext).pop(false),
child: const Text('Zurück'),
),
],
);
},
);
await showQuestionDialog(context, "Achtung", "Wenn Sie den Dialog jetzt schließen gehen erfasste Daten verloren und die Aufgabe oder Station bleibt unerledigt.", [
TextButton(onPressed: () => {Navigator.of(MyApp.appNavigatorKey.currentContext!).pop(), close = true}, child: const Text('Schließen')),
TextButton(onPressed: () => {Navigator.of(MyApp.appNavigatorKey.currentContext!).pop(), close = false}, child: const Text('Zurück')),
]);
if (close) {
Navigator.of(MyApp.appNavigatorKey.currentContext!).pop();
}
return close;
return result ?? false;
}