From 0e2b8db63a9cdc7216b95778f91c74a73445979b Mon Sep 17 00:00:00 2001 From: haroon amjad Date: Mon, 27 Apr 2026 11:50:33 +0300 Subject: [PATCH] Updates & fixes --- .../book_appointments_view_model.dart | 18 +++++++++--------- lib/main.dart | 4 +++- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/lib/features/book_appointments/book_appointments_view_model.dart b/lib/features/book_appointments/book_appointments_view_model.dart index 7ac6ae45..1d15fdd2 100644 --- a/lib/features/book_appointments/book_appointments_view_model.dart +++ b/lib/features/book_appointments/book_appointments_view_model.dart @@ -421,14 +421,14 @@ class BookAppointmentsViewModel extends ChangeNotifier { }); } } else { - for (var group in doctorsListGrouped) { - group.sort((a, b) { - var aSlot = a.decimalDoctorRate; - var bSlot = b.decimalDoctorRate; - if (aSlot == null || bSlot == null) return 0; - return bSlot.compareTo(aSlot); - }); - } + // for (var group in doctorsListGrouped) { + // group.sort((a, b) { + // var aSlot = a.decimalDoctorRate; + // var bSlot = b.decimalDoctorRate; + // if (aSlot == null || bSlot == null) return 0; + // return bSlot.compareTo(aSlot); + // }); + // } // doctorsList.sort((a, b) => b.decimalDoctorRate!.compareTo(a.decimalDoctorRate!)); } @@ -677,7 +677,7 @@ class BookAppointmentsViewModel extends ChangeNotifier { doctorsList = apiResponse.data!; filteredDoctorList = doctorsList; isDoctorsListLoading = false; - doctorsList.sort((a, b) => b.decimalDoctorRate!.compareTo(a.decimalDoctorRate!)); + // doctorsList.sort((a, b) => b.decimalDoctorRate!.compareTo(a.decimalDoctorRate!)); initializeFilteredList(); clearSearchFilters(); getFiltersFromDoctorList(); diff --git a/lib/main.dart b/lib/main.dart index 23f7c4d7..4aa20551 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -88,7 +88,9 @@ Future callAppStateInitializations() async { appState.setDeviceTypeID = deviceTypeId; // Pass all uncaught "fatal" errors from the framework to Crashlytics - FlutterError.onError = FirebaseCrashlytics.instance.recordFlutterFatalError; + if (!kDebugMode) { + FlutterError.onError = FirebaseCrashlytics.instance.recordFlutterFatalError; + } // Pass all uncaught asynchronous errors that aren't handled by the Flutter framework to Crashlytics PlatformDispatcher.instance.onError = (error, stack) {