Fehlerkorrekturen und Erweiterungen

This commit is contained in:
Sven committed 2025-09-02 11:26:43 +02:00
1 parent a16a8fcf28
commit 1207d9c517
12 files changed
+158 -60

No files matched your search

+2 -6
View File
@@ -198,9 +198,7 @@ Future<List<Widget>> _fetchJobWidgets(StateSetter dialogState, Function() onFini
payload: RemoveJobMessage(id: job.id),
);
if (mounted) {
setState(() {});
}
setState(() {});
});
}),
),
@@ -217,9 +215,7 @@ Future<List<Widget>> _fetchJobWidgets(StateSetter dialogState, Function() onFini
payload: RemoveJobMessage(id: job.id),
);
if (mounted) {
setState(() {});
}
setState(() {});
});
}),
)
+10 -4
View File
@@ -6,10 +6,16 @@ showTaskArrivedPopup(BuildContext context, TaskInfo taskInfo, Function() onFinis
await showDialog(
context: context,
builder: (BuildContext context) {
return WillPopScope(
onWillPop: () async {
return await taskDialogSecurityException(context);
}, // False will prevent and true will allow to dismiss
return PopScope(
canPop: false,
onPopInvoked: (bool didPop) async {
if (!didPop) {
final shouldPop = await taskDialogSecurityException(context);
if (shouldPop && context.mounted) {
Navigator.of(context).pop();
}
}
},
child: AlertDialog(
contentPadding: EdgeInsets.zero,
shadowColor: Colors.transparent,
@@ -7,9 +7,15 @@ showComissionNumberPopup(BuildContext context, TaskInfo taskInfo, Function(Strin
await showDialog(
context: context,
builder: (BuildContext context) {
return WillPopScope(
onWillPop: () async {
return await taskDialogSecurityException(context);
return PopScope(
canPop: false,
onPopInvoked: (bool didPop) async {
if (!didPop) {
final shouldPop = await taskDialogSecurityException(context);
if (shouldPop && context.mounted) {
Navigator.of(context).pop();
}
}
},
child: AlertDialog(
contentPadding: EdgeInsets.zero,
@@ -18,10 +18,16 @@ showPickupDeliveryStatusPopup(BuildContext context, TaskInfo taskInfo, Function(
TextEditingController controller = TextEditingController();
TextEditingController remController = TextEditingController();
return WillPopScope(
onWillPop: () async {
return await taskDialogSecurityException(context);
},
return PopScope(
canPop: false,
onPopInvoked: (bool didPop) async {
if (!didPop) {
final shouldPop = await taskDialogSecurityException(context);
if (shouldPop && context.mounted) {
Navigator.of(context).pop();
}
}
},
child: AlertDialog(
contentPadding: EdgeInsets.zero,
shadowColor: Colors.transparent,
@@ -17,11 +17,17 @@ showReceiptGiverPopup(BuildContext context, TaskInfo taskInfo, Function(String,
await showDialog(
context: context,
builder: (BuildContext context) {
return WillPopScope(
onWillPop: () async {
return await taskDialogSecurityException(context);
},
child: AlertDialog(
return PopScope(
canPop: false,
onPopInvoked: (bool didPop) async {
if (!didPop) {
final shouldPop = await taskDialogSecurityException(context);
if (shouldPop && context.mounted) {
Navigator.of(context).pop();
}
}
},
child: AlertDialog(
contentPadding: EdgeInsets.zero,
shadowColor: Colors.transparent,
backgroundColor: Colors.white,
+11 -8
View File
@@ -8,15 +8,18 @@ showSignaturePopup(BuildContext context, TaskInfo taskInfo, Function(String?) on
await showDialog(
context: context,
builder: (BuildContext context) {
return WillPopScope(
onWillPop: () async {
var result = await taskDialogSecurityException(context);
if (result) {
SystemChrome.setPreferredOrientations([DeviceOrientation.portraitUp]);
return PopScope(
canPop: false,
onPopInvoked: (bool didPop) async {
if (!didPop) {
final shouldPop = await taskDialogSecurityException(context);
if (shouldPop) {
SystemChrome.setPreferredOrientations([DeviceOrientation.portraitUp]);
if (context.mounted) {
Navigator.of(context).pop();
}
}
}
return result;
},
child: AlertDialog(
contentPadding: EdgeInsets.zero,
@@ -7,11 +7,17 @@ showStationNoticePopup(BuildContext context, TaskInfo taskInfo, Function(String)
await showDialog(
context: context,
builder: (BuildContext context) {
return WillPopScope(
onWillPop: () async {
return await taskDialogSecurityException(context);
},
child: AlertDialog(
return PopScope(
canPop: false,
onPopInvoked: (bool didPop) async {
if (!didPop) {
final shouldPop = await taskDialogSecurityException(context);
if (shouldPop && context.mounted) {
Navigator.of(context).pop();
}
}
},
child: AlertDialog(
contentPadding: EdgeInsets.zero,
shadowColor: Colors.transparent,
backgroundColor: Colors.white,
+10 -4
View File
@@ -16,10 +16,16 @@ Future<void> showTakePhotosPopup(BuildContext context, TaskInfo taskInfo, Functi
await showDialog(
context: context,
builder: (BuildContext context) {
return WillPopScope(
onWillPop: () async {
return await taskDialogSecurityException(context);
},
return PopScope(
canPop: false,
onPopInvoked: (bool didPop) async {
if (!didPop) {
final shouldPop = await taskDialogSecurityException(context);
if (shouldPop && context.mounted) {
Navigator.of(context).pop();
}
}
},
child: AlertDialog(
contentPadding: EdgeInsets.zero,
shadowColor: Colors.transparent,
+11 -5
View File
@@ -5,11 +5,17 @@ showZipPopup(BuildContext context, String text, String buttonText, Function(Stri
await showDialog(
context: context,
builder: (BuildContext context) {
return WillPopScope(
onWillPop: () async {
return await taskDialogSecurityException(context);
},
child: AlertDialog(
return PopScope(
canPop: false,
onPopInvoked: (bool didPop) async {
if (!didPop) {
final shouldPop = await taskDialogSecurityException(context);
if (shouldPop && context.mounted) {
Navigator.of(context).pop();
}
}
},
child: AlertDialog(
contentPadding: EdgeInsets.zero,
shadowColor: Colors.transparent,
backgroundColor: Colors.white,