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