pop removed

dev_v3.13.6
taha.alam 1 year ago
parent 7486f320dc
commit 5e0eec2ba0

@ -54,6 +54,7 @@ Future<void> _showReminderDialog(BuildContext context, DateTime dateTime, String
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(0.0)), shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(0.0)),
insetPadding: EdgeInsets.all(21), insetPadding: EdgeInsets.all(21),
child: ReminderDialog( child: ReminderDialog(
shouldPop: false,
onClick: (int i) async { onClick: (int i) async {
String text = ""; String text = "";
if (i == 0) { if (i == 0) {
@ -85,6 +86,7 @@ Future<void> _showReminderDialog(BuildContext context, DateTime dateTime, String
description: description ?? "At " + appoDateFormatted + " " + appoTimeFormatted, description: description ?? "At " + appoDateFormatted + " " + appoTimeFormatted,
scheduleDateTime: dateTime, scheduleDateTime: dateTime,
eventId: eventId); eventId: eventId);
Navigator.of(context).pop();
onSuccess(); onSuccess();
} }
} else { } else {
@ -100,8 +102,9 @@ Future<void> _showReminderDialog(BuildContext context, DateTime dateTime, String
class ReminderDialog extends StatefulWidget { class ReminderDialog extends StatefulWidget {
Function? onClick; Function? onClick;
bool? shouldPop;
ReminderDialog({this.onClick}); ReminderDialog({this.onClick, this.shouldPop = true});
@override @override
_ReminderDialogState createState() => _ReminderDialogState(); _ReminderDialogState createState() => _ReminderDialogState();
@ -247,7 +250,9 @@ class _ReminderDialogState extends State<ReminderDialog> {
TranslationBase.of(context).save, TranslationBase.of(context).save,
() { () {
widget.onClick!(i); widget.onClick!(i);
Navigator.pop(context); if(widget.shouldPop == true) {
Navigator.pop(context);
}
}, },
color: CustomColors.green, color: CustomColors.green,
), ),

Loading…
Cancel
Save