This commit is contained in:
Sven committed 2024-08-08 09:58:41 +02:00
1 parent 7a681ddcc6
commit 0ac8ab8cf5
17 files changed
+34 -41

No files matched your search

+1 -1
View File
@@ -450,7 +450,7 @@ class MqttCore {
var message = bootstrapResponsePayload.message;
if (status > 0) {
showAlertDialog(MyApp.appNavigatorKey.currentContext!, status == 1 ? "Information" : "Fehler", message);
showAlertDialog(status == 1 ? "Information" : "Fehler", message);
}
if (status < 2) {
+6 -6
View File
@@ -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;