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

+3 -3
View File
@@ -23,13 +23,13 @@ late Timer _checkForNewJobsTimer;
late Map<int, DateTime> _firstDelayTimeMap;
late Map<int, bool> _infoExpandedMap;
Future<void> showAcceptJobsPopup(BuildContext context, SharedMapReference mapReference, Function() onFinished) async {
Future<void> showAcceptJobsPopup(SharedMapReference mapReference, Function() onFinished) async {
_initTimer = true;
_firstDelayTimeMap = {};
_infoExpandedMap = {};
await showDialog<void>(
context: context,
context: MyApp.appNavigatorKey.currentContext!,
builder: (BuildContext context) {
return WillPopScope(
onWillPop: () async {
@@ -85,7 +85,7 @@ void _startTimer(BuildContext context, SharedMapReference mapReference, StateSet
} else {
_stopTimer();
Navigator.of(context).pop();
Navigator.of(MyApp.appNavigatorKey.currentContext!).pop();
onFinished();
}
+2 -2
View File
@@ -8,7 +8,7 @@ import 'package:stadtbote/tools/messages/current_connection_status_message.dart'
import 'package:stadtbote/tools/messages/request_connection_status_message.dart';
import 'package:stadtbote/tools/util.dart';
void showInfosPopup(BuildContext context, SessionStatus? status) async {
void showInfosPopup(SessionStatus? status) async {
final int version = await Util.getAppVersion();
late String connectedString = "Bitte warten...";
@@ -24,7 +24,7 @@ void showInfosPopup(BuildContext context, SessionStatus? status) async {
await showDialog(
// ignore: use_build_context_synchronously
context: context,
context: MyApp.appNavigatorKey.currentContext!,
builder: (BuildContext context) {
// ignore: deprecated_member_use
return WillPopScope(
+1 -1
View File
@@ -36,7 +36,7 @@ showMapPopup(BuildContext context, JobTour currentTour, List<JobTour> tourList)
currentTour = tour;
streamController[tour.sort]!.sink.add(true);
} else {
showAlertDialog(context, 'Information', 'Es liegt keine Position für diese Station vor');
showAlertDialog('Information', 'Es liegt keine Position für diese Station vor');
}
},
child: SizedBox(
@@ -69,7 +69,7 @@ showPickupDeliveryStatusPopup(BuildContext context, TaskInfo taskInfo, Function(
onFinished(selectedTourEntry, remController.text)
} else {
showAlertDialog(context, "Fehler", "Bitte geben Sie eine Bemerkung ein")
showAlertDialog("Fehler", "Bitte geben Sie eine Bemerkung ein")
}
} else {
Navigator.of(context).pop(),
@@ -51,7 +51,7 @@ showReceiptGiverPopup(BuildContext context, TaskInfo taskInfo, Function(String)
onFinished(textEditingController.text);
} else {
showAlertDialog(context, "Fehler", "Sie müssen einen Text eingeben");
showAlertDialog("Fehler", "Sie müssen einen Text eingeben");
}
})
],
+1 -1
View File
@@ -81,7 +81,7 @@ showSignaturePopup(BuildContext context, TaskInfo taskInfo, Function(String?) on
if (controller.points.length > 50)
{Navigator.of(context).pop(), onFinished(convertPoints(controller.points))}
else
{showAlertDialog(context, "Fehler", "Die Unterschrift ist zu kurz.")}
{showAlertDialog("Fehler", "Die Unterschrift ist zu kurz.")}
})
],
),
@@ -132,7 +132,7 @@ Future<void> showTakePhotosPopup(BuildContext context, TaskInfo taskInfo, Functi
if (imageDataList.length >= taskInfo.task.min! && imageDataList.length <= taskInfo.task.max!)
{Navigator.of(context).pop(), onFinished(imageDataList)}
else
{showAlertDialog(context, 'Fehler', 'Es müssen mindestens ${taskInfo.task.min} Foto(s) aufgenommen werden')}
{showAlertDialog('Fehler', 'Es müssen mindestens ${taskInfo.task.min} Foto(s) aufgenommen werden')}
})
],
),
+1 -1
View File
@@ -64,7 +64,7 @@ bool _checkInput(BuildContext context, String input) {
}
if (message.isNotEmpty) {
showAlertDialog(context, 'Fehler', message);
showAlertDialog('Fehler', message);
}
return message.isEmpty;