From e4fe4baa27e11b40dbb6e70c03cad4909ef416d5 Mon Sep 17 00:00:00 2001 From: haroon amjad Date: Sun, 18 Jun 2023 20:30:44 +0300 Subject: [PATCH] nearest appo crash fixed --- lib/pages/BookAppointment/components/SearchByClinic.dart | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/lib/pages/BookAppointment/components/SearchByClinic.dart b/lib/pages/BookAppointment/components/SearchByClinic.dart index 891d01cb..850e23af 100644 --- a/lib/pages/BookAppointment/components/SearchByClinic.dart +++ b/lib/pages/BookAppointment/components/SearchByClinic.dart @@ -243,8 +243,7 @@ class _SearchByClinicState extends State { Navigator.push(context, FadePage(page: LaserClinic())); } else if (!isDentalSelectedAndSupported()) { projectDropdownValue = ""; - if(!nearestAppo) - getDoctorsList(context); + if (!nearestAppo) getDoctorsList(context); } else {} }); projectViewModel.analytics.appointment.book_appointment_select_clinic(appointment_type: 'regular', clinic: clincs.clinicDescription); @@ -531,8 +530,8 @@ class _SearchByClinicState extends State { searchInfo.clinic = selectedClinic; searchInfo.date = DateTime.now(); - if(projectViewModel.isLogin) { - if(projectViewModel.user.age > 12) { + if (projectViewModel.isLogin) { + if (projectViewModel.user.age > 12) { navigateToDentalComplaints(context, searchInfo); } else { callDoctorsSearchAPI(17); @@ -606,6 +605,8 @@ class _SearchByClinicState extends State { result = LinkedHashSet.from(arr).toList(); numAll = result.length; + nearestAppo = false; + isProjectLoaded = false; navigateToSearchResults(context, doctorsList, _patientDoctorAppointmentListHospital); } else { AppToast.showErrorToast(message: res['ErrorEndUserMessage']);