Updates & fixes

pull/303/head
haroon amjad 2 days ago
parent 93cbb563bc
commit 0e2b8db63a

@ -421,14 +421,14 @@ class BookAppointmentsViewModel extends ChangeNotifier {
}); });
} }
} else { } else {
for (var group in doctorsListGrouped) { // for (var group in doctorsListGrouped) {
group.sort((a, b) { // group.sort((a, b) {
var aSlot = a.decimalDoctorRate; // var aSlot = a.decimalDoctorRate;
var bSlot = b.decimalDoctorRate; // var bSlot = b.decimalDoctorRate;
if (aSlot == null || bSlot == null) return 0; // if (aSlot == null || bSlot == null) return 0;
return bSlot.compareTo(aSlot); // return bSlot.compareTo(aSlot);
}); // });
} // }
// doctorsList.sort((a, b) => b.decimalDoctorRate!.compareTo(a.decimalDoctorRate!)); // doctorsList.sort((a, b) => b.decimalDoctorRate!.compareTo(a.decimalDoctorRate!));
} }
@ -677,7 +677,7 @@ class BookAppointmentsViewModel extends ChangeNotifier {
doctorsList = apiResponse.data!; doctorsList = apiResponse.data!;
filteredDoctorList = doctorsList; filteredDoctorList = doctorsList;
isDoctorsListLoading = false; isDoctorsListLoading = false;
doctorsList.sort((a, b) => b.decimalDoctorRate!.compareTo(a.decimalDoctorRate!)); // doctorsList.sort((a, b) => b.decimalDoctorRate!.compareTo(a.decimalDoctorRate!));
initializeFilteredList(); initializeFilteredList();
clearSearchFilters(); clearSearchFilters();
getFiltersFromDoctorList(); getFiltersFromDoctorList();

@ -88,7 +88,9 @@ Future<void> callAppStateInitializations() async {
appState.setDeviceTypeID = deviceTypeId; appState.setDeviceTypeID = deviceTypeId;
// Pass all uncaught "fatal" errors from the framework to Crashlytics // 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 // Pass all uncaught asynchronous errors that aren't handled by the Flutter framework to Crashlytics
PlatformDispatcher.instance.onError = (error, stack) { PlatformDispatcher.instance.onError = (error, stack) {

Loading…
Cancel
Save