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 {