|  |  | @ -3,8 +3,7 @@ import 'package:hmg_patient_app_new/core/app_state.dart'; | 
			
		
	
		
		
			
				
					
					|  |  |  | import 'package:hmg_patient_app_new/core/cache_consts.dart' show CacheConst; |  |  |  | import 'package:hmg_patient_app_new/core/cache_consts.dart' show CacheConst; | 
			
		
	
		
		
			
				
					
					|  |  |  | import 'package:hmg_patient_app_new/core/utils/utils.dart' show Utils; |  |  |  | import 'package:hmg_patient_app_new/core/utils/utils.dart' show Utils; | 
			
		
	
		
		
			
				
					
					|  |  |  | import 'package:hmg_patient_app_new/features/my_appointments/models/facility_selection.dart'; |  |  |  | import 'package:hmg_patient_app_new/features/my_appointments/models/facility_selection.dart'; | 
			
		
	
		
		
			
				
					
					|  |  |  | import 'package:hmg_patient_app_new/features/my_appointments/models/resp_models/doctor_list_api_response.dart' |  |  |  | import 'package:hmg_patient_app_new/features/my_appointments/models/resp_models/doctor_list_api_response.dart' show RegionList, PatientDoctorAppointmentListByRegion; | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |     show RegionList, PatientDoctorAppointmentListByRegion; |  |  |  |  | 
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  | import 'package:hmg_patient_app_new/features/my_appointments/models/resp_models/patient_appointment_history_response_model.dart'; |  |  |  | import 'package:hmg_patient_app_new/features/my_appointments/models/resp_models/patient_appointment_history_response_model.dart'; | 
			
		
	
		
		
			
				
					
					|  |  |  | import 'package:hmg_patient_app_new/features/my_appointments/models/resp_models/patient_appointment_share_response_model.dart'; |  |  |  | import 'package:hmg_patient_app_new/features/my_appointments/models/resp_models/patient_appointment_share_response_model.dart'; | 
			
		
	
		
		
			
				
					
					|  |  |  | import 'package:hmg_patient_app_new/features/my_appointments/my_appointments_repo.dart'; |  |  |  | import 'package:hmg_patient_app_new/features/my_appointments/my_appointments_repo.dart'; | 
			
		
	
	
		
		
			
				
					|  |  | @ -13,7 +12,6 @@ import 'package:location/location.dart' show Location; | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  | import '../../core/utils/doctor_response_mapper.dart' show DoctorMapper; |  |  |  | import '../../core/utils/doctor_response_mapper.dart' show DoctorMapper; | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  | class MyAppointmentsViewModel extends ChangeNotifier { |  |  |  | class MyAppointmentsViewModel extends ChangeNotifier { | 
			
		
	
		
		
			
				
					
					|  |  |  |   int selectedTabIndex = 0; |  |  |  |   int selectedTabIndex = 0; | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
	
		
		
			
				
					|  |  | @ -26,16 +24,12 @@ class MyAppointmentsViewModel extends ChangeNotifier { | 
			
		
	
		
		
			
				
					
					|  |  |  |   bool isTimeLineAppointmentsLoading = false; |  |  |  |   bool isTimeLineAppointmentsLoading = false; | 
			
		
	
		
		
			
				
					
					|  |  |  |   bool isPatientMyDoctorsLoading = false; |  |  |  |   bool isPatientMyDoctorsLoading = false; | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |   List<PatientAppointmentHistoryResponseModel> patientAppointmentsHistoryList = |  |  |  |   List<PatientAppointmentHistoryResponseModel> patientAppointmentsHistoryList = []; | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |       []; |  |  |  |  | 
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |   List<PatientAppointmentHistoryResponseModel> |  |  |  |   List<PatientAppointmentHistoryResponseModel> patientUpcomingAppointmentsHistoryList = []; | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |       patientUpcomingAppointmentsHistoryList = []; |  |  |  |   List<PatientAppointmentHistoryResponseModel> patientArrivedAppointmentsHistoryList = []; | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |   List<PatientAppointmentHistoryResponseModel> |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |       patientArrivedAppointmentsHistoryList = []; |  |  |  |  | 
			
		
	
		
		
	
		
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |   List<PatientAppointmentHistoryResponseModel> patientTimelineAppointmentsList = |  |  |  |   List<PatientAppointmentHistoryResponseModel> patientTimelineAppointmentsList = []; | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |       []; |  |  |  |  | 
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |   List<PatientAppointmentHistoryResponseModel> patientMyDoctorsList = []; |  |  |  |   List<PatientAppointmentHistoryResponseModel> patientMyDoctorsList = []; | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
	
		
		
			
				
					|  |  | @ -46,15 +40,13 @@ class MyAppointmentsViewModel extends ChangeNotifier { | 
			
		
	
		
		
			
				
					
					|  |  |  |   FacilitySelection currentlySelectedFacility = FacilitySelection.ALL; |  |  |  |   FacilitySelection currentlySelectedFacility = FacilitySelection.ALL; | 
			
		
	
		
		
			
				
					
					|  |  |  |   bool isRegionListLoading = false; |  |  |  |   bool isRegionListLoading = false; | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |   MyAppointmentsViewModel( |  |  |  |   MyAppointmentsViewModel({required this.myAppointmentsRepo, required this.errorHandlerService, required this.appState}); | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |       {required this.myAppointmentsRepo, required this.errorHandlerService,required this.appState}); |  |  |  |  | 
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |   void onTabChange(int index) { |  |  |  |   void onTabChange(int index) { | 
			
		
	
		
		
			
				
					
					|  |  |  |     selectedTabIndex = index; |  |  |  |     selectedTabIndex = index; | 
			
		
	
		
		
			
				
					
					|  |  |  |     notifyListeners(); |  |  |  |     notifyListeners(); | 
			
		
	
		
		
			
				
					
					|  |  |  |   } |  |  |  |   } | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |   initAppointmentsViewModel() { |  |  |  |   initAppointmentsViewModel() { | 
			
		
	
		
		
			
				
					
					|  |  |  |     patientAppointmentsHistoryList.clear(); |  |  |  |     patientAppointmentsHistoryList.clear(); | 
			
		
	
		
		
			
				
					
					|  |  |  |     patientUpcomingAppointmentsHistoryList.clear(); |  |  |  |     patientUpcomingAppointmentsHistoryList.clear(); | 
			
		
	
	
		
		
			
				
					|  |  | @ -89,8 +81,7 @@ class MyAppointmentsViewModel extends ChangeNotifier { | 
			
		
	
		
		
			
				
					
					|  |  |  |     notifyListeners(); |  |  |  |     notifyListeners(); | 
			
		
	
		
		
			
				
					
					|  |  |  |   } |  |  |  |   } | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |   setAppointmentReminder( |  |  |  |   setAppointmentReminder(bool value, PatientAppointmentHistoryResponseModel item) { | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |       bool value, PatientAppointmentHistoryResponseModel item) { |  |  |  |  | 
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |     int index = patientAppointmentsHistoryList.indexOf(item); |  |  |  |     int index = patientAppointmentsHistoryList.indexOf(item); | 
			
		
	
		
		
			
				
					
					|  |  |  |     if (index != -1) { |  |  |  |     if (index != -1) { | 
			
		
	
		
		
			
				
					
					|  |  |  |       patientAppointmentsHistoryList[index].hasReminder = value; |  |  |  |       patientAppointmentsHistoryList[index].hasReminder = value; | 
			
		
	
	
		
		
			
				
					|  |  | @ -98,18 +89,12 @@ class MyAppointmentsViewModel extends ChangeNotifier { | 
			
		
	
		
		
			
				
					
					|  |  |  |     } |  |  |  |     } | 
			
		
	
		
		
			
				
					
					|  |  |  |   } |  |  |  |   } | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |   Future<void> getPatientAppointments( |  |  |  |   Future<void> getPatientAppointments(bool isActiveAppointment, bool isArrivedAppointments, {Function(dynamic)? onSuccess, Function(String)? onError}) async { | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |       bool isActiveAppointment, bool isArrivedAppointments, |  |  |  |     final result = await myAppointmentsRepo.getPatientAppointments(isActiveAppointment: isActiveAppointment, isArrivedAppointments: isArrivedAppointments); | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |       {Function(dynamic)? onSuccess, Function(String)? onError}) async { |  |  |  |     final resultArrived = await myAppointmentsRepo.getPatientAppointments(isActiveAppointment: false, isArrivedAppointments: true); | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |     final result = await myAppointmentsRepo.getPatientAppointments( |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |         isActiveAppointment: isActiveAppointment, |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |         isArrivedAppointments: isArrivedAppointments); |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |     final resultArrived = await myAppointmentsRepo.getPatientAppointments( |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |         isActiveAppointment: false, isArrivedAppointments: true); |  |  |  |  | 
			
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |     result.fold( |  |  |  |     result.fold( | 
			
		
	
		
		
			
				
					
					|  |  |  |       (failure) async => |  |  |  |       (failure) async => await errorHandlerService.handleError(failure: failure), | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |           await errorHandlerService.handleError(failure: failure), |  |  |  |  | 
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |       (apiResponse) { |  |  |  |       (apiResponse) { | 
			
		
	
		
		
			
				
					
					|  |  |  |         if (apiResponse.messageStatus == 2) { |  |  |  |         if (apiResponse.messageStatus == 2) { | 
			
		
	
		
		
			
				
					
					|  |  |  |           // dialogService.showErrorDialog(message: apiResponse.errorMessage!, onOkPressed: () {}); |  |  |  |           // dialogService.showErrorDialog(message: apiResponse.errorMessage!, onOkPressed: () {}); | 
			
		
	
	
		
		
			
				
					|  |  | @ -125,8 +110,7 @@ class MyAppointmentsViewModel extends ChangeNotifier { | 
			
		
	
		
		
			
				
					
					|  |  |  |     ); |  |  |  |     ); | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |     resultArrived.fold( |  |  |  |     resultArrived.fold( | 
			
		
	
		
		
			
				
					
					|  |  |  |       (failure) async => |  |  |  |       (failure) async => await errorHandlerService.handleError(failure: failure), | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |           await errorHandlerService.handleError(failure: failure), |  |  |  |  | 
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |       (apiResponse) { |  |  |  |       (apiResponse) { | 
			
		
	
		
		
			
				
					
					|  |  |  |         if (apiResponse.messageStatus == 2) { |  |  |  |         if (apiResponse.messageStatus == 2) { | 
			
		
	
		
		
			
				
					
					|  |  |  |           // dialogService.showErrorDialog(message: apiResponse.errorMessage!, onOkPressed: () {}); |  |  |  |           // dialogService.showErrorDialog(message: apiResponse.errorMessage!, onOkPressed: () {}); | 
			
		
	
	
		
		
			
				
					|  |  | @ -141,27 +125,19 @@ class MyAppointmentsViewModel extends ChangeNotifier { | 
			
		
	
		
		
			
				
					
					|  |  |  |       }, |  |  |  |       }, | 
			
		
	
		
		
			
				
					
					|  |  |  |     ); |  |  |  |     ); | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |     patientAppointmentsHistoryList |  |  |  |     patientAppointmentsHistoryList.addAll(patientUpcomingAppointmentsHistoryList); | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |         .addAll(patientUpcomingAppointmentsHistoryList); |  |  |  |     patientAppointmentsHistoryList.addAll(patientArrivedAppointmentsHistoryList); | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |     patientAppointmentsHistoryList |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |         .addAll(patientArrivedAppointmentsHistoryList); |  |  |  |  | 
			
		
	
		
		
	
		
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |     print( |  |  |  |     print('Upcoming Appointments: ${patientUpcomingAppointmentsHistoryList.length}'); | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |         'Upcoming Appointments: ${patientUpcomingAppointmentsHistoryList.length}'); |  |  |  |     print('Arrived Appointments: ${patientArrivedAppointmentsHistoryList.length}'); | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |     print( |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |         'Arrived Appointments: ${patientArrivedAppointmentsHistoryList.length}'); |  |  |  |  | 
			
		
	
		
		
	
		
		
	
		
		
			
				
					
					|  |  |  |     print('All Appointments: ${patientAppointmentsHistoryList.length}'); |  |  |  |     print('All Appointments: ${patientAppointmentsHistoryList.length}'); | 
			
		
	
		
		
			
				
					
					|  |  |  |   } |  |  |  |   } | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |   Future<void> getPatientShareAppointment( |  |  |  |   Future<void> getPatientShareAppointment(int projectID, int clinicID, String appointmentNo, {Function(dynamic)? onSuccess, Function(String)? onError}) async { | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |       int projectID, int clinicID, String appointmentNo, |  |  |  |     final result = await myAppointmentsRepo.getPatientShareAppointment(projectID: projectID, clinicID: clinicID, appointmentNo: appointmentNo); | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |       {Function(dynamic)? onSuccess, Function(String)? onError}) async { |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |     final result = await myAppointmentsRepo.getPatientShareAppointment( |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |         projectID: projectID, clinicID: clinicID, appointmentNo: appointmentNo); |  |  |  |  | 
			
		
	
		
		
	
		
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |     result.fold( |  |  |  |     result.fold( | 
			
		
	
		
		
			
				
					
					|  |  |  |       (failure) async => |  |  |  |       (failure) async => await errorHandlerService.handleError(failure: failure), | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |           await errorHandlerService.handleError(failure: failure), |  |  |  |  | 
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |       (apiResponse) { |  |  |  |       (apiResponse) { | 
			
		
	
		
		
			
				
					
					|  |  |  |         if (apiResponse.messageStatus == 2) { |  |  |  |         if (apiResponse.messageStatus == 2) { | 
			
		
	
		
		
			
				
					
					|  |  |  |           // dialogService.showErrorDialog(message: apiResponse.errorMessage!, onOkPressed: () {}); |  |  |  |           // dialogService.showErrorDialog(message: apiResponse.errorMessage!, onOkPressed: () {}); | 
			
		
	
	
		
		
			
				
					|  |  | @ -178,19 +154,11 @@ class MyAppointmentsViewModel extends ChangeNotifier { | 
			
		
	
		
		
			
				
					
					|  |  |  |   } |  |  |  |   } | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |   Future<void> addAdvanceNumberRequest( |  |  |  |   Future<void> addAdvanceNumberRequest( | 
			
		
	
		
		
			
				
					
					|  |  |  |       {required String advanceNumber, |  |  |  |       {required String advanceNumber, required String paymentReference, required String appointmentNo, Function(dynamic)? onSuccess, Function(String)? onError}) async { | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |       required String paymentReference, |  |  |  |     final result = await myAppointmentsRepo.addAdvanceNumberRequest(advanceNumber: advanceNumber, paymentReference: paymentReference, appointmentNo: appointmentNo); | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |       required String appointmentNo, |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |       Function(dynamic)? onSuccess, |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |       Function(String)? onError}) async { |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |     final result = await myAppointmentsRepo.addAdvanceNumberRequest( |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |         advanceNumber: advanceNumber, |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |         paymentReference: paymentReference, |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |         appointmentNo: appointmentNo); |  |  |  |  | 
			
		
	
		
		
	
		
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |     result.fold( |  |  |  |     result.fold( | 
			
		
	
		
		
			
				
					
					|  |  |  |       (failure) async => |  |  |  |       (failure) async => await errorHandlerService.handleError(failure: failure), | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |           await errorHandlerService.handleError(failure: failure), |  |  |  |  | 
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |       (apiResponse) { |  |  |  |       (apiResponse) { | 
			
		
	
		
		
			
				
					
					|  |  |  |         if (apiResponse.messageStatus == 2) { |  |  |  |         if (apiResponse.messageStatus == 2) { | 
			
		
	
		
		
			
				
					
					|  |  |  |           // dialogService.showErrorDialog(message: apiResponse.errorMessage!, onOkPressed: () {}); |  |  |  |           // dialogService.showErrorDialog(message: apiResponse.errorMessage!, onOkPressed: () {}); | 
			
		
	
	
		
		
			
				
					|  |  | @ -205,21 +173,11 @@ class MyAppointmentsViewModel extends ChangeNotifier { | 
			
		
	
		
		
			
				
					
					|  |  |  |   } |  |  |  |   } | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |   Future<void> generateAppointmentQR( |  |  |  |   Future<void> generateAppointmentQR( | 
			
		
	
		
		
			
				
					
					|  |  |  |       {required int clinicID, |  |  |  |       {required int clinicID, required int projectID, required String appointmentNo, required int isFollowUp, Function(dynamic)? onSuccess, Function(String)? onError}) async { | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |       required int projectID, |  |  |  |     final result = await myAppointmentsRepo.generateAppointmentQR(clinicID: clinicID, projectID: projectID, appointmentNo: appointmentNo, isFollowUp: isFollowUp); | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |       required String appointmentNo, |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |       required int isFollowUp, |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |       Function(dynamic)? onSuccess, |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |       Function(String)? onError}) async { |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |     final result = await myAppointmentsRepo.generateAppointmentQR( |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |         clinicID: clinicID, |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |         projectID: projectID, |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |         appointmentNo: appointmentNo, |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |         isFollowUp: isFollowUp); |  |  |  |  | 
			
		
	
		
		
	
		
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |     result.fold( |  |  |  |     result.fold( | 
			
		
	
		
		
			
				
					
					|  |  |  |       (failure) async => |  |  |  |       (failure) async => await errorHandlerService.handleError(failure: failure), | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |           await errorHandlerService.handleError(failure: failure), |  |  |  |  | 
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |       (apiResponse) { |  |  |  |       (apiResponse) { | 
			
		
	
		
		
			
				
					
					|  |  |  |         if (apiResponse.messageStatus == 2) { |  |  |  |         if (apiResponse.messageStatus == 2) { | 
			
		
	
		
		
			
				
					
					|  |  |  |           // dialogService.showErrorDialog(message: apiResponse.errorMessage!, onOkPressed: () {}); |  |  |  |           // dialogService.showErrorDialog(message: apiResponse.errorMessage!, onOkPressed: () {}); | 
			
		
	
	
		
		
			
				
					|  |  | @ -233,18 +191,11 @@ class MyAppointmentsViewModel extends ChangeNotifier { | 
			
		
	
		
		
			
				
					
					|  |  |  |     ); |  |  |  |     ); | 
			
		
	
		
		
			
				
					
					|  |  |  |   } |  |  |  |   } | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |   Future<void> cancelAppointment( |  |  |  |   Future<void> cancelAppointment({required PatientAppointmentHistoryResponseModel patientAppointmentHistoryResponseModel, Function(dynamic)? onSuccess, Function(String)? onError}) async { | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |       {required PatientAppointmentHistoryResponseModel |  |  |  |     final result = await myAppointmentsRepo.cancelAppointment(patientAppointmentHistoryResponseModel: patientAppointmentHistoryResponseModel); | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |           patientAppointmentHistoryResponseModel, |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |       Function(dynamic)? onSuccess, |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |       Function(String)? onError}) async { |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |     final result = await myAppointmentsRepo.cancelAppointment( |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |         patientAppointmentHistoryResponseModel: |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |             patientAppointmentHistoryResponseModel); |  |  |  |  | 
			
		
	
		
		
	
		
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |     result.fold( |  |  |  |     result.fold( | 
			
		
	
		
		
			
				
					
					|  |  |  |       (failure) async => |  |  |  |       (failure) async => await errorHandlerService.handleError(failure: failure), | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |           await errorHandlerService.handleError(failure: failure), |  |  |  |  | 
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |       (apiResponse) { |  |  |  |       (apiResponse) { | 
			
		
	
		
		
			
				
					
					|  |  |  |         if (apiResponse.messageStatus == 2) { |  |  |  |         if (apiResponse.messageStatus == 2) { | 
			
		
	
		
		
			
				
					
					|  |  |  |           onError!(apiResponse.errorMessage!); |  |  |  |           onError!(apiResponse.errorMessage!); | 
			
		
	
	
		
		
			
				
					|  |  | @ -259,18 +210,11 @@ class MyAppointmentsViewModel extends ChangeNotifier { | 
			
		
	
		
		
			
				
					
					|  |  |  |     ); |  |  |  |     ); | 
			
		
	
		
		
			
				
					
					|  |  |  |   } |  |  |  |   } | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |   Future<void> confirmAppointment( |  |  |  |   Future<void> confirmAppointment({required PatientAppointmentHistoryResponseModel patientAppointmentHistoryResponseModel, Function(dynamic)? onSuccess, Function(String)? onError}) async { | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |       {required PatientAppointmentHistoryResponseModel |  |  |  |     final result = await myAppointmentsRepo.confirmAppointment(patientAppointmentHistoryResponseModel: patientAppointmentHistoryResponseModel); | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |           patientAppointmentHistoryResponseModel, |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |       Function(dynamic)? onSuccess, |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |       Function(String)? onError}) async { |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |     final result = await myAppointmentsRepo.confirmAppointment( |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |         patientAppointmentHistoryResponseModel: |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |             patientAppointmentHistoryResponseModel); |  |  |  |  | 
			
		
	
		
		
	
		
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |     result.fold( |  |  |  |     result.fold( | 
			
		
	
		
		
			
				
					
					|  |  |  |       (failure) async => |  |  |  |       (failure) async => await errorHandlerService.handleError(failure: failure), | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |           await errorHandlerService.handleError(failure: failure), |  |  |  |  | 
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |       (apiResponse) { |  |  |  |       (apiResponse) { | 
			
		
	
		
		
			
				
					
					|  |  |  |         if (apiResponse.messageStatus == 2) { |  |  |  |         if (apiResponse.messageStatus == 2) { | 
			
		
	
		
		
			
				
					
					|  |  |  |           onError!(apiResponse.errorMessage!); |  |  |  |           onError!(apiResponse.errorMessage!); | 
			
		
	
	
		
		
			
				
					|  |  | @ -307,8 +251,7 @@ class MyAppointmentsViewModel extends ChangeNotifier { | 
			
		
	
		
		
			
				
					
					|  |  |  |         patientType: patientType); |  |  |  |         patientType: patientType); | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |     result.fold( |  |  |  |     result.fold( | 
			
		
	
		
		
			
				
					
					|  |  |  |       (failure) async => |  |  |  |       (failure) async => await errorHandlerService.handleError(failure: failure), | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |           await errorHandlerService.handleError(failure: failure), |  |  |  |  | 
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |       (apiResponse) { |  |  |  |       (apiResponse) { | 
			
		
	
		
		
			
				
					
					|  |  |  |         if (apiResponse.messageStatus == 2) { |  |  |  |         if (apiResponse.messageStatus == 2) { | 
			
		
	
		
		
			
				
					
					|  |  |  |           // dialogService.showErrorDialog(message: apiResponse.errorMessage!, onOkPressed: () {}); |  |  |  |           // dialogService.showErrorDialog(message: apiResponse.errorMessage!, onOkPressed: () {}); | 
			
		
	
	
		
		
			
				
					|  |  | @ -323,21 +266,15 @@ class MyAppointmentsViewModel extends ChangeNotifier { | 
			
		
	
		
		
			
				
					
					|  |  |  |   } |  |  |  |   } | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |   Future<void> sendCheckInNfcRequest( |  |  |  |   Future<void> sendCheckInNfcRequest( | 
			
		
	
		
		
			
				
					
					|  |  |  |       {required PatientAppointmentHistoryResponseModel |  |  |  |       {required PatientAppointmentHistoryResponseModel patientAppointmentHistoryResponseModel, | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |           patientAppointmentHistoryResponseModel, |  |  |  |  | 
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |       required String scannedCode, |  |  |  |       required String scannedCode, | 
			
		
	
		
		
			
				
					
					|  |  |  |       required int checkInType, |  |  |  |       required int checkInType, | 
			
		
	
		
		
			
				
					
					|  |  |  |       Function(dynamic)? onSuccess, |  |  |  |       Function(dynamic)? onSuccess, | 
			
		
	
		
		
			
				
					
					|  |  |  |       Function(String)? onError}) async { |  |  |  |       Function(String)? onError}) async { | 
			
		
	
		
		
			
				
					
					|  |  |  |     final result = await myAppointmentsRepo.sendCheckInNfcRequest( |  |  |  |     final result = await myAppointmentsRepo.sendCheckInNfcRequest(patientAppointmentHistoryResponseModel: patientAppointmentHistoryResponseModel, scannedCode: scannedCode, checkInType: checkInType); | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |         patientAppointmentHistoryResponseModel: |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |             patientAppointmentHistoryResponseModel, |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |         scannedCode: scannedCode, |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |         checkInType: checkInType); |  |  |  |  | 
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |     result.fold( |  |  |  |     result.fold( | 
			
		
	
		
		
			
				
					
					|  |  |  |       (failure) async => |  |  |  |       (failure) async => await errorHandlerService.handleError(failure: failure), | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |           await errorHandlerService.handleError(failure: failure), |  |  |  |  | 
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |       (apiResponse) { |  |  |  |       (apiResponse) { | 
			
		
	
		
		
			
				
					
					|  |  |  |         if (apiResponse.messageStatus == 2) { |  |  |  |         if (apiResponse.messageStatus == 2) { | 
			
		
	
		
		
			
				
					
					|  |  |  |           onError!(apiResponse.errorMessage!); |  |  |  |           onError!(apiResponse.errorMessage!); | 
			
		
	
	
		
		
			
				
					|  |  | @ -352,13 +289,14 @@ class MyAppointmentsViewModel extends ChangeNotifier { | 
			
		
	
		
		
			
				
					
					|  |  |  |     ); |  |  |  |     ); | 
			
		
	
		
		
			
				
					
					|  |  |  |   } |  |  |  |   } | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |   Future<void> getPatientMyDoctors( |  |  |  |   Future<void> getPatientMyDoctors({Function(dynamic)? onSuccess, Function(String)? onError}) async { | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |       {Function(dynamic)? onSuccess, Function(String)? onError}) async { |  |  |  |  | 
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |     final result = await myAppointmentsRepo.getPatientDoctorsList(); |  |  |  |     final result = await myAppointmentsRepo.getPatientDoctorsList(); | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |     result.fold( |  |  |  |     result.fold( | 
			
		
	
		
		
			
				
					
					|  |  |  |       (failure) async => |  |  |  |       // (failure) async => await errorHandlerService.handleError(failure: failure), | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |           await errorHandlerService.handleError(failure: failure), |  |  |  |       (failure) async { | 
			
				
				
			
		
	
		
		
	
		
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         isPatientMyDoctorsLoading = false; | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       }, | 
			
		
	
		
		
			
				
					
					|  |  |  |       (apiResponse) { |  |  |  |       (apiResponse) { | 
			
		
	
		
		
			
				
					
					|  |  |  |         if (apiResponse.messageStatus == 2) { |  |  |  |         if (apiResponse.messageStatus == 2) { | 
			
		
	
		
		
			
				
					
					|  |  |  |           // dialogService.showErrorDialog(message: apiResponse.errorMessage!, onOkPressed: () {}); |  |  |  |           // dialogService.showErrorDialog(message: apiResponse.errorMessage!, onOkPressed: () {}); | 
			
		
	
	
		
		
			
				
					|  |  | @ -375,7 +313,7 @@ class MyAppointmentsViewModel extends ChangeNotifier { | 
			
		
	
		
		
			
				
					
					|  |  |  |   } |  |  |  |   } | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |   Future<void> getRegionMappedProjectList() async { |  |  |  |   Future<void> getRegionMappedProjectList() async { | 
			
		
	
		
		
			
				
					
					|  |  |  |     if(hospitalList != null && hospitalList!.registeredDoctorMap != null && hospitalList!.registeredDoctorMap!.isNotEmpty){ |  |  |  |     if (hospitalList != null && hospitalList!.registeredDoctorMap != null && hospitalList!.registeredDoctorMap!.isNotEmpty) { | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |       filteredHospitalList = hospitalList; |  |  |  |       filteredHospitalList = hospitalList; | 
			
		
	
		
		
			
				
					
					|  |  |  |       return; |  |  |  |       return; | 
			
		
	
		
		
			
				
					
					|  |  |  |     } |  |  |  |     } | 
			
		
	
	
		
		
			
				
					|  |  | @ -384,21 +322,18 @@ class MyAppointmentsViewModel extends ChangeNotifier { | 
			
		
	
		
		
			
				
					
					|  |  |  |     final result = await myAppointmentsRepo.getProjectList(); |  |  |  |     final result = await myAppointmentsRepo.getProjectList(); | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |     result.fold( |  |  |  |     result.fold( | 
			
		
	
		
		
			
				
					
					|  |  |  |       (failure) async => |  |  |  |       (failure) async => await errorHandlerService.handleError(failure: failure), | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |           await errorHandlerService.handleError(failure: failure), |  |  |  |  | 
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |       (apiResponse) async { |  |  |  |       (apiResponse) async { | 
			
		
	
		
		
			
				
					
					|  |  |  |         if (apiResponse.messageStatus == 2) { |  |  |  |         if (apiResponse.messageStatus == 2) { | 
			
		
	
		
		
			
				
					
					|  |  |  |           // dialogService.showErrorDialog(message: apiResponse.errorMessage!, onOkPressed: () {}); |  |  |  |           // dialogService.showErrorDialog(message: apiResponse.errorMessage!, onOkPressed: () {}); | 
			
		
	
		
		
			
				
					
					|  |  |  |         } else if (apiResponse.messageStatus == 1) { |  |  |  |         } else if (apiResponse.messageStatus == 1) { | 
			
		
	
		
		
			
				
					
					|  |  |  |           var projectList = apiResponse.data!; |  |  |  |           var projectList = apiResponse.data!; | 
			
		
	
		
		
			
				
					
					|  |  |  |           hospitalList = await DoctorMapper.getMappedHospitals(projectList, |  |  |  |           hospitalList = await DoctorMapper.getMappedHospitals(projectList, isArabic: false); | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |               isArabic: false); |  |  |  |  | 
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |           var lat = await Utils.getNumFromPrefs(CacheConst.userLat); |  |  |  |           var lat = await Utils.getNumFromPrefs(CacheConst.userLat); | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |           var lng = await Utils.getNumFromPrefs(CacheConst.userLong); |  |  |  |           var lng = await Utils.getNumFromPrefs(CacheConst.userLong); | 
			
		
	
		
		
			
				
					
					|  |  |  |           var isLocationEnabled = (lat != 0) && (lng != 0); |  |  |  |           var isLocationEnabled = (lat != 0) && (lng != 0); | 
			
		
	
		
		
			
				
					
					|  |  |  |           hospitalList = |  |  |  |           hospitalList = await DoctorMapper.sortList(isLocationEnabled, hospitalList!); | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |               await DoctorMapper.sortList(isLocationEnabled, hospitalList!); |  |  |  |  | 
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |           isRegionListLoading = false; |  |  |  |           isRegionListLoading = false; | 
			
		
	
		
		
			
				
					
					|  |  |  |           filteredHospitalList = hospitalList; |  |  |  |           filteredHospitalList = hospitalList; | 
			
		
	
	
		
		
			
				
					|  |  | @ -414,22 +349,21 @@ class MyAppointmentsViewModel extends ChangeNotifier { | 
			
		
	
		
		
			
				
					
					|  |  |  |   } |  |  |  |   } | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |   void filterHospitalListByString(String? value, String? selectedRegionId, bool isHMG) { |  |  |  |   void filterHospitalListByString(String? value, String? selectedRegionId, bool isHMG) { | 
			
		
	
		
		
			
				
					
					|  |  |  |     if(value ==null || value.isEmpty){ |  |  |  |     if (value == null || value.isEmpty) { | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |       filteredHospitalList = hospitalList; |  |  |  |       filteredHospitalList = hospitalList; | 
			
		
	
		
		
			
				
					
					|  |  |  |     } else { |  |  |  |     } else { | 
			
		
	
		
		
			
				
					
					|  |  |  |       filteredHospitalList = RegionList(); |  |  |  |       filteredHospitalList = RegionList(); | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |       var list = isHMG |  |  |  |       var list = isHMG ? hospitalList?.registeredDoctorMap![selectedRegionId]!.hmgDoctorList : hospitalList?.registeredDoctorMap![selectedRegionId]!.hmcDoctorList; | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |           ? hospitalList?.registeredDoctorMap![selectedRegionId]!.hmgDoctorList |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |           : hospitalList?.registeredDoctorMap![selectedRegionId]!.hmcDoctorList; |  |  |  |  | 
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |       if(list != null && list.isEmpty){ notifyListeners(); return;} |  |  |  |       if (list != null && list.isEmpty) { | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         notifyListeners(); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         return; | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       } | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |       var filteredList = list!.where((element) => |  |  |  |       var filteredList = list!.where((element) => element.filterName!.toLowerCase().contains(value.toLowerCase())).toList(); | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |           element.filterName!.toLowerCase().contains(value.toLowerCase()) |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |          ).toList(); |  |  |  |  | 
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |       var regionData = PatientDoctorAppointmentListByRegion(); |  |  |  |       var regionData = PatientDoctorAppointmentListByRegion(); | 
			
		
	
		
		
			
				
					
					|  |  |  |       if(isHMG){ |  |  |  |       if (isHMG) { | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |         regionData.hmgDoctorList = filteredList; |  |  |  |         regionData.hmgDoctorList = filteredList; | 
			
		
	
		
		
			
				
					
					|  |  |  |         regionData.hmgSize = filteredList.length; |  |  |  |         regionData.hmgSize = filteredList.length; | 
			
		
	
		
		
			
				
					
					|  |  |  |       } else { |  |  |  |       } else { | 
			
		
	
	
		
		
			
				
					|  |  | @ -437,19 +371,17 @@ class MyAppointmentsViewModel extends ChangeNotifier { | 
			
		
	
		
		
			
				
					
					|  |  |  |         regionData.hmcSize = filteredList.length; |  |  |  |         regionData.hmcSize = filteredList.length; | 
			
		
	
		
		
			
				
					
					|  |  |  |       } |  |  |  |       } | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |       filteredHospitalList?.registeredDoctorMap = { |  |  |  |       filteredHospitalList?.registeredDoctorMap = {selectedRegionId!: regionData}; | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |         selectedRegionId! : regionData |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |       }; |  |  |  |  | 
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |     } |  |  |  |     } | 
			
		
	
		
		
			
				
					
					|  |  |  |     notifyListeners(); |  |  |  |     notifyListeners(); | 
			
		
	
		
		
			
				
					
					|  |  |  |   } |  |  |  |   } | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |   Future<bool> isLocationEnabled() async{ |  |  |  |   Future<bool> isLocationEnabled() async { | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |      return await Location().serviceEnabled(); |  |  |  |     return await Location().serviceEnabled(); | 
			
				
				
			
		
	
		
		
	
		
		
	
		
		
			
				
					
					|  |  |  |   } |  |  |  |   } | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |   bool getLocationStatus() { |  |  |  |   bool getLocationStatus() { | 
			
		
	
		
		
			
				
					
					|  |  |  |     bool isLocationAvaiable =  false; |  |  |  |     bool isLocationAvaiable = false; | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |     isLocationEnabled().then((value) => isLocationAvaiable = value); |  |  |  |     isLocationEnabled().then((value) => isLocationAvaiable = value); | 
			
		
	
		
		
			
				
					
					|  |  |  |     return isLocationAvaiable; |  |  |  |     return isLocationAvaiable; | 
			
		
	
		
		
			
				
					
					|  |  |  |   } |  |  |  |   } | 
			
		
	
	
		
		
			
				
					|  |  | 
 |