diff --git a/lib/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/NewCMC/new_cmc_step_three_page.dart b/lib/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/NewCMC/new_cmc_step_three_page.dart index e4a060b5..20d4f9f5 100644 --- a/lib/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/NewCMC/new_cmc_step_three_page.dart +++ b/lib/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/NewCMC/new_cmc_step_three_page.dart @@ -44,7 +44,7 @@ class _NewCMCStepThreePageState extends State { HospitalsModel? selectedHospital; final GlobalKey projectDropdownKey = GlobalKey(); bool isLocationSelected = false; - ProjectViewModel projectViewModel; + ProjectViewModel? projectViewModel; static CameraPosition _kGooglePlex = CameraPosition( target: LatLng(37.42796133580664, -122.085749655962), @@ -299,7 +299,7 @@ class _NewCMCStepThreePageState extends State { crossAxisAlignment: CrossAxisAlignment.start, children: [ Text( - projectViewModel.isArabic + projectViewModel!.isArabic ? widget .cmcInsertPresOrderRequestModel .patientERCMCInsertServicesList![index] @@ -403,7 +403,7 @@ class _NewCMCStepThreePageState extends State { } getProjectsList() { - int languageID = projectViewModel.isArabic ? 1 : 2; + int languageID = projectViewModel!.isArabic ? 1 : 2; ClinicListService service = new ClinicListService(); GifLoaderDialogUtils.showMyDialog(context); List projectsListLocal = []; diff --git a/lib/pages/AlHabibMedicalService/health_calculator/bmi_calculator/bariatrics-screen.dart b/lib/pages/AlHabibMedicalService/health_calculator/bmi_calculator/bariatrics-screen.dart index 8ac5be9b..66c50e5b 100644 --- a/lib/pages/AlHabibMedicalService/health_calculator/bmi_calculator/bariatrics-screen.dart +++ b/lib/pages/AlHabibMedicalService/health_calculator/bmi_calculator/bariatrics-screen.dart @@ -114,7 +114,7 @@ class _BariatricsPageState extends State { margin: EdgeInsets.only(bottom: 16.0, left: 16, right: 16), child: BorderedButton( TranslationBase.of(context).skip, - fontSize: SizeConfig!.textMultiplier! * 2.1, + fontSize: SizeConfig.textMultiplier! * 2.1, textColor: Colors.blue, vPadding: 8, hPadding: 8, @@ -139,7 +139,8 @@ class _BariatricsPageState extends State { } callDoctorsSearchAPI() { - int languageID = projectProvider.isArabic ? 1 : 2; + ProjectViewModel projectProvider = Provider.of(context); + int languageID = projectProvider.isArabic! ? 1 : 2; GifLoaderDialogUtils.showMyDialog(context); List doctorsList = []; List arr = []; diff --git a/lib/pages/BookAppointment/DentalComplaints.dart b/lib/pages/BookAppointment/DentalComplaints.dart index a0c47aa9..afac872c 100644 --- a/lib/pages/BookAppointment/DentalComplaints.dart +++ b/lib/pages/BookAppointment/DentalComplaints.dart @@ -214,7 +214,7 @@ class _DentalComplaintsState extends State { GifLoaderDialogUtils.showMyDialog(context); int appoTime = 0; - service.getDoctorsList(int.parse("17"), widget.searchInfo!.ProjectID, false, languageID, context, isContinueDentalPlan: true).then((res) { + service.getDoctorsList(int.parse("17"), widget.searchInfo!.ProjectID!, false, languageID, context, isContinueDentalPlan: true).then((res) { GifLoaderDialogUtils.hideDialog(context); if (res['MessageStatus'] == 1) { dentalProceduresModel = DentalProceduresModel.fromJson(res as Map); diff --git a/lib/pages/BookAppointment/components/SearchByClinic.dart b/lib/pages/BookAppointment/components/SearchByClinic.dart index 8896b19f..b25a488f 100644 --- a/lib/pages/BookAppointment/components/SearchByClinic.dart +++ b/lib/pages/BookAppointment/components/SearchByClinic.dart @@ -611,7 +611,7 @@ class _SearchByClinicState extends State { List _patientDoctorAppointmentListHospital = []; DoctorsListService service = new DoctorsListService(); - service.getDoctorsList(clinicID, projectDropdownValue != "" ? int.parse(projectDropdownValue) : 0, nearestAppo, languageID, context).then((res) { + service.getDoctorsList(clinicID, projectDropdownValue != "" ? int.parse(projectDropdownValue!) : 0, nearestAppo, languageID, context).then((res) { GifLoaderDialogUtils.hideDialog(context); if (res['MessageStatus'] == 1) { setState(() { diff --git a/lib/pages/BookAppointment/widgets/DentalComplaintCard.dart b/lib/pages/BookAppointment/widgets/DentalComplaintCard.dart index 0ce8c602..765e83fa 100644 --- a/lib/pages/BookAppointment/widgets/DentalComplaintCard.dart +++ b/lib/pages/BookAppointment/widgets/DentalComplaintCard.dart @@ -68,7 +68,7 @@ class _DentalComplaintCardState extends State { GifLoaderDialogUtils.showMyDialog(context); ClinicListService service = new ClinicListService(); - service.getChiefComplaintDoctorList(widget.listDentalChiefComplain!.iD!, widget.listDentalChiefComplain.projectID, languageID, context).then((res) { + service.getChiefComplaintDoctorList(widget.listDentalChiefComplain!.iD!, widget.listDentalChiefComplain.projectID!, languageID, context).then((res) { GifLoaderDialogUtils.hideDialog(context); if (res['MessageStatus'] == 1) { print(res['List_DentalDoctorChiefComplaintMapping']); diff --git a/lib/pages/DrawerPages/family/my-family.dart b/lib/pages/DrawerPages/family/my-family.dart index 340158e7..18828044 100644 --- a/lib/pages/DrawerPages/family/my-family.dart +++ b/lib/pages/DrawerPages/family/my-family.dart @@ -564,7 +564,7 @@ class _MyFamily extends State with TickerProviderStateMixin { } familySharedRecordsList =[]; sentRecordsList = []; - familySharedRecords.getAllSharedRecordsByStatusList.forEach((element) { + familySharedRecords.getAllSharedRecordsByStatusList!.forEach((element) { if (element.status == 3) { familySharedRecordsList.add(element); } diff --git a/lib/pages/MyAppointments/MyAppointments.dart b/lib/pages/MyAppointments/MyAppointments.dart index 3fe1c6ba..a75935e3 100644 --- a/lib/pages/MyAppointments/MyAppointments.dart +++ b/lib/pages/MyAppointments/MyAppointments.dart @@ -55,7 +55,7 @@ class _MyAppointmentsState extends State with SingleTickerProvid int _currentPage = 0; ToDoCountProviderModel? toDoProvider; - ProjectViewModel projectViewModel; + ProjectViewModel? projectViewModel; @override void initState() { @@ -137,7 +137,7 @@ class _MyAppointmentsState extends State with SingleTickerProvid } getPatientAppointmentHistory() { - int languageID = projectViewModel.isArabic ? 1 : 2; + int languageID = projectViewModel!.isArabic! ? 1 : 2; GifLoaderDialogUtils.showMyDialog(context); DoctorsListService service = new DoctorsListService(); widget.appoList.clear(); diff --git a/lib/pages/MyAppointments/VisitTicket.dart b/lib/pages/MyAppointments/VisitTicket.dart index a1b44b7a..fd12e95b 100644 --- a/lib/pages/MyAppointments/VisitTicket.dart +++ b/lib/pages/MyAppointments/VisitTicket.dart @@ -19,7 +19,7 @@ class VisitTicket extends StatefulWidget { class _VisitTicketState extends State { bool isLoading = false; - ProjectViewModel projectViewModel; + ProjectViewModel? projectViewModel; @override void initState() { @@ -52,7 +52,7 @@ class _VisitTicketState extends State { } getPatientAppointmentCurfewHistory(BuildContext context) { - int languageID = projectViewModel.isArabic ? 1 : 2; + int languageID = projectViewModel!.isArabic ? 1 : 2; DoctorsListService service = new DoctorsListService(); GifLoaderDialogUtils.showMyDialog(context); service.getPatientAppointmentHistory(true, languageID, context).then((res) { diff --git a/lib/pages/MyAppointments/widgets/AppointmentActions.dart b/lib/pages/MyAppointments/widgets/AppointmentActions.dart index 330648df..09e7c40e 100644 --- a/lib/pages/MyAppointments/widgets/AppointmentActions.dart +++ b/lib/pages/MyAppointments/widgets/AppointmentActions.dart @@ -372,7 +372,7 @@ class _AppointmentActionsState extends State { // } openAppointmentLabResults() { - int languageID = widget.projectViewModel.isArabic ? 1 : 2; + int languageID = widget.projectViewModel!.isArabic ? 1 : 2; GifLoaderDialogUtils.showMyDialog(context); DoctorsListService service = new DoctorsListService(); PatientLabOrders patientLabOrders = new PatientLabOrders(); @@ -408,7 +408,7 @@ class _AppointmentActionsState extends State { } openAppointmentRadiology() { - int languageID = widget.projectViewModel.isArabic ? 1 : 2; + int languageID = widget.projectViewModel!.isArabic! ? 1 : 2; GifLoaderDialogUtils.showMyDialog(context); DoctorsListService service = new DoctorsListService(); FinalRadiology finalRadiology = new FinalRadiology(); diff --git a/lib/pages/feedback/send_feedback_page.dart b/lib/pages/feedback/send_feedback_page.dart index c223f5a8..19696467 100644 --- a/lib/pages/feedback/send_feedback_page.dart +++ b/lib/pages/feedback/send_feedback_page.dart @@ -58,7 +58,7 @@ class _SendFeedbackPageState extends State { List appoList = []; - ProjectViewModel projectViewModel; + ProjectViewModel? projectViewModel; String getSelected(BuildContext context) { switch (messageType) { @@ -471,7 +471,7 @@ class _SendFeedbackPageState extends State { listData: list, selectedIndex: selectedStatusIndex, onValueSelected: (index) { - int languageID = projectViewModel.isArabic ? 1 : 2; + int languageID = projectViewModel!.isArabic ? 1 : 2; selectedStatusIndex = index; if (index == 1) { diff --git a/lib/pages/landing/landing_page.dart b/lib/pages/landing/landing_page.dart index de6d1731..ed6781b0 100644 --- a/lib/pages/landing/landing_page.dart +++ b/lib/pages/landing/landing_page.dart @@ -636,7 +636,7 @@ class _LandingPageState extends State with WidgetsBindingObserver { notificationCount = value['List_PatientDashboard'][0]['UnreadPatientNotificationCount'] > 99 ? '99+' : value['List_PatientDashboard'][0]['UnreadPatientNotificationCount'].toString(); model.setState(model.count, true, notificationCount); sharedPref.setString(NOTIFICATION_COUNT, notificationCount); - FlutterAppIconBadge.updateBadge(num.parse(notificationCount)); + FlutterAppIconBadge.updateBadge(int.parse(notificationCount)); } }); // if (await AppSharedPreferences().getBool(IS_LAST_APPOINTMENT_RATE_SHOWN) == null || !await AppSharedPreferences().getBool(IS_LAST_APPOINTMENT_RATE_SHOWN)) { diff --git a/lib/pages/livecare/widgets/clinic_card.dart b/lib/pages/livecare/widgets/clinic_card.dart index 4b6c5a83..5c5c4aaa 100644 --- a/lib/pages/livecare/widgets/clinic_card.dart +++ b/lib/pages/livecare/widgets/clinic_card.dart @@ -166,7 +166,7 @@ class _State extends State { int languageID = widget.languageID == 'ar' ? 1 : 2; LiveCareService service = new LiveCareService(); GifLoaderDialogUtils.showMyDialog(context); - service.getLivecareClinicTiming(patientERGetClinicsList!.serviceID, languageID, context).then((res) { + service.getLivecareClinicTiming(patientERGetClinicsList!.serviceID!, languageID, context).then((res) { GifLoaderDialogUtils.hideDialog(context); if (res['MessageStatus'] == 1) { setState(() { diff --git a/lib/services/clinic_services/get_clinic_service.dart b/lib/services/clinic_services/get_clinic_service.dart index a9f8c47d..0db10b3f 100644 --- a/lib/services/clinic_services/get_clinic_service.dart +++ b/lib/services/clinic_services/get_clinic_service.dart @@ -153,20 +153,6 @@ class ClinicListService extends BaseService { return Future.value(localRes); } - Future getProjectsList(context) async { - Map request = {}; - - request = {"LanguageID": languageID}; - - dynamic localRes; - - await baseAppClient.post(GET_PROJECTS_LIST, onSuccess: (response, statusCode) async { - localRes = response; - }, onFailure: (String error, int statusCode) { - throw error; - }, body: request); - return Future.value(localRes); - } Future getChiefComplaintsList(int clinicID, int projectID, int languageID, BuildContext context, {doctorId}) async { //Utils.showProgressDialog(context); @@ -260,13 +246,7 @@ class ClinicListService extends BaseService { }, body: request); return Future.value(localRes); } - await baseAppClient.post(GET_NATIONALITY, onSuccess: (response, statusCode) async { - localRes = response; - }, onFailure: (String error, int statusCode) { - throw error; - }, body: request); - return Future.value(localRes); - } + Future insertInPatientOrder( GetAdmissionInfoResponseModel getAdmissionInfoResponseModel, int typeID, String patientName, String patientNameAR, String patientMobileNo, String comments, context) async { diff --git a/lib/uitl/location_util.dart b/lib/uitl/location_util.dart index 9b4541ca..5e16f14b 100644 --- a/lib/uitl/location_util.dart +++ b/lib/uitl/location_util.dart @@ -127,7 +127,7 @@ class LocationUtils { accuracy: 1.0, heading: 0.0, speed: 0.0, - speedAccuracy: 1, + speedAccuracy: 1, altitudeAccuracy: 0.0, headingAccuracy: 0.0, // altitudeAccuracy: 0.0, // headingAccuracy: 0.0, // altitudeAccuracy: 0, diff --git a/lib/uitl/push-notification-handler.dart b/lib/uitl/push-notification-handler.dart index b0d8f6e7..d7979e42 100644 --- a/lib/uitl/push-notification-handler.dart +++ b/lib/uitl/push-notification-handler.dart @@ -306,15 +306,15 @@ class PushNotificationHandler { // print("Push Notification getToken: " + token!); // onToken(token!); // }); - FirebaseMessaging.instance.getToken(vapidKey: 'BHRJG8sIzcysWxPw3B6xQjz_85nUuCfU6EAmpH18kyUTmB2cj35IdFwCyWSab80SA1v6oBSWVh-p6PcHPw_y00Y').then((String token) { - print("Push Notification getToken: " + token); - onToken(token); + FirebaseMessaging.instance.getToken(vapidKey: 'BHRJG8sIzcysWxPw3B6xQjz_85nUuCfU6EAmpH18kyUTmB2cj35IdFwCyWSab80SA1v6oBSWVh-p6PcHPw_y00Y').then((String? token) { + print("Push Notification getToken: " + token!); + onToken(token!); }); if(Platform.isIOS) { FirebaseMessaging.instance.getAPNSToken().then((value) { - print("Push APNS getToken: " + value); + print("Push APNS getToken: " + value!); }); } diff --git a/lib/widgets/others/bottom_bar.dart b/lib/widgets/others/bottom_bar.dart index bda62b24..cee0e6d7 100644 --- a/lib/widgets/others/bottom_bar.dart +++ b/lib/widgets/others/bottom_bar.dart @@ -68,7 +68,7 @@ class _SearchBot extends State { bool _isInit = true; TextEditingController searchController = TextEditingController(); - ProjectViewModel projectProvider; + ProjectViewModel? projectProvider; @override void initState() { @@ -378,7 +378,7 @@ class _SearchBot extends State { } getDoctorProfile(projectId, clinicId, doctorId, context, doctorData) { - int languageID = projectProvider.isArabic ? 1 : 2; + int languageID = projectProvider!.isArabic ? 1 : 2; List docProfileList = []; DoctorsListService service = new DoctorsListService(); @@ -399,7 +399,7 @@ class _SearchBot extends State { } getDoctorsList(projectId, clinicId, context, {doctorId, doctorName}) { - int languageID = projectProvider.isArabic ? 1 : 2; + int languageID = projectProvider!.isArabic ? 1 : 2; List doctorsList = []; List arr = []; List arrDistance = [];