From 6c98f9f94f2b9d065b1477067c62df7eb248119d Mon Sep 17 00:00:00 2001 From: haroon amjad Date: Wed, 25 Sep 2024 14:53:26 +0300 Subject: [PATCH] updates & fixes --- lib/pages/BookAppointment/DoctorProfile.dart | 2 +- .../components/DocAvailableAppointments.dart | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/lib/pages/BookAppointment/DoctorProfile.dart b/lib/pages/BookAppointment/DoctorProfile.dart index 1681322c..1674c43d 100644 --- a/lib/pages/BookAppointment/DoctorProfile.dart +++ b/lib/pages/BookAppointment/DoctorProfile.dart @@ -627,7 +627,7 @@ class _DoctorProfileState extends State with TickerProviderStateM navigateToWaitingAppointment(context); }).catchError((err) { GifLoaderDialogUtils.hideDialog(context); - AppToast.showErrorToast(message: err); + AppToast.showErrorToast(message: err, localContext: context); print(err); }); } diff --git a/lib/pages/BookAppointment/components/DocAvailableAppointments.dart b/lib/pages/BookAppointment/components/DocAvailableAppointments.dart index 0052545b..d1221f47 100644 --- a/lib/pages/BookAppointment/components/DocAvailableAppointments.dart +++ b/lib/pages/BookAppointment/components/DocAvailableAppointments.dart @@ -359,16 +359,16 @@ class _DocAvailableAppointmentsState extends State wit DocAvailableAppointments.areAppointmentsAvailable = true; freeSlotsResponse = res['FreeTimeSlots']; _getJSONSlots().then((value) { - setState(() => { - _events.clear(), - _events = value, + setState(() { + _events.clear(); + _events = value; if (widget.doctorSchedule != null) { - _onDaySelected(DateUtil.convertStringToDate(widget.doctorSchedule['Date'])), + _onDaySelected(DateUtil.convertStringToDate(widget.doctorSchedule['Date'])); _calendarController.selectedDate = DateUtil.convertStringToDate( widget.doctorSchedule['Date'], - ) - }, + ); + }; }); }); } else {