From 34ffec93fda21e740cdd22ddf7ea8970872baf0c Mon Sep 17 00:00:00 2001 From: "taha.alam" Date: Sun, 20 Oct 2024 12:59:48 +0300 Subject: [PATCH] WD: calender issue fixed. --- lib/pages/BookAppointment/widgets/reminder_dialog.dart | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/pages/BookAppointment/widgets/reminder_dialog.dart b/lib/pages/BookAppointment/widgets/reminder_dialog.dart index a16876db..b3c39861 100644 --- a/lib/pages/BookAppointment/widgets/reminder_dialog.dart +++ b/lib/pages/BookAppointment/widgets/reminder_dialog.dart @@ -1,6 +1,7 @@ import 'dart:io'; import 'package:diplomaticquarterapp/analytics/google-analytics.dart'; +import 'package:diplomaticquarterapp/config/config.dart'; import 'package:diplomaticquarterapp/locator.dart'; import 'package:diplomaticquarterapp/services/permission/permission_service.dart'; import 'package:diplomaticquarterapp/theme/colors.dart'; @@ -44,10 +45,10 @@ showReminderDialog(BuildContext context, DateTime dateTime, String doctorName, S } } -Future _showReminderDialog(BuildContext context, DateTime dateTime, String doctorName, String eventId, String appoDateFormatted, String appoTimeFormatted, +Future _showReminderDialog(BuildContext providedContext, DateTime dateTime, String doctorName, String eventId, String appoDateFormatted, String appoTimeFormatted, {required Function onSuccess, String? title, String? description, Function(int)? onMultiDateSuccess, bool? isMultiAllowed}) async { return showDialog( - context: context, + context: providedContext, barrierDismissible: true, // user must tap button! builder: (BuildContext context) { return Dialog( @@ -81,7 +82,7 @@ Future _showReminderDialog(BuildContext context, DateTime dateTime, String if (onMultiDateSuccess == null) { CalendarUtils calendarUtils = await CalendarUtils.getInstance(); await calendarUtils.createOrUpdateEvent( - title: title ?? TranslationBase.of(context).reminderTitle + " " + doctorName, + title: title ?? TranslationBase.of(providedContext).reminderTitle + " " + doctorName, description: description ?? "At " + appoDateFormatted + " " + appoTimeFormatted, scheduleDateTime: dateTime, eventId: eventId);