Cleanup
This commit is contained in:
1 parent
7a681ddcc6
commit
0ac8ab8cf5
17 files changed
+34
-41
No files matched your search
+6
-6
@@ -395,9 +395,9 @@ Future<void> showQuestionDialog(BuildContext context, String title, String messa
|
||||
);
|
||||
}
|
||||
|
||||
Future<void> showAlertDialog(BuildContext context, String title, String message) async {
|
||||
Future<void> showAlertDialog(String title, String message) async {
|
||||
await showDialog(
|
||||
context: context,
|
||||
context: MyApp.appNavigatorKey.currentContext!,
|
||||
builder: (context) {
|
||||
return AlertDialog(
|
||||
title: Text(title),
|
||||
@@ -441,7 +441,7 @@ class DecimalTextInputFormatter extends TextInputFormatter {
|
||||
if (text != "") {
|
||||
RegExp regExp;
|
||||
if (decimalPlaces > 0) {
|
||||
regExp = RegExp(r'[0-9]+[,]{0,1}[0-9]{0,' + decimalPlaces.toString() + '}');
|
||||
regExp = RegExp(r'[0-9]+[,]{0,1}[0-9]{0,${' + decimalPlaces.toString() + '}');
|
||||
} else {
|
||||
regExp = RegExp(r'[0-9]{0,' + maxLength.toString() +'}');
|
||||
}
|
||||
@@ -460,12 +460,12 @@ Future<bool> taskDialogSecurityException(BuildContext context) async {
|
||||
bool close = false;
|
||||
|
||||
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(context).pop(), close = true}, child: const Text('Schließen')),
|
||||
TextButton(onPressed: () => {Navigator.of(context).pop(), close = false}, child: const Text('Zurück')),
|
||||
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(context).pop();
|
||||
Navigator.of(MyApp.appNavigatorKey.currentContext!).pop();
|
||||
}
|
||||
|
||||
return close;
|
||||
|
||||
Reference in new issue
Block a user