From 971bab465cfb0a37ae3bfa8996b74d5b79975866 Mon Sep 17 00:00:00 2001 From: devamirsaleemahmad Date: Thu, 19 Oct 2023 15:50:09 +0300 Subject: [PATCH] models updates -> 3.13.6 --- .../requests/CreateCustomerRequestModel.dart | 2 +- .../AlHabibMedicalService/H2O_service.dart | 12 +- .../service/appointment_rate_service.dart | 2 +- lib/core/service/er/EdOnlineServices.dart | 2 +- .../service/feedback/feedback_service.dart | 8 +- lib/core/service/insurance_service.dart | 2 +- lib/core/service/medical/EyeService.dart | 8 +- .../medical/PatientSickLeaveService.dart | 2 +- lib/core/service/medical/labs_service.dart | 2 +- .../medical/prescriptions_service.dart | 2 +- .../service/medical/radiology_service.dart | 2 +- lib/core/service/medical/reports_service.dart | 8 +- .../parmacyModule/parmacy_module_service.dart | 2 +- lib/core/service/vaccine_service.dart | 2 +- .../AlHabibMedicalService/H2O_view_model.dart | 4 +- .../AlHabibMedicalService/cmc_view_model.dart | 4 +- .../home_health_care_view_model.dart | 2 +- .../viewModels/PharmacyPagesViewModel.dart | 6 +- .../viewModels/TermsConditionsViewModel.dart | 2 +- .../ancillary_orders_view_model.dart | 4 +- .../appointment_rate_view_model.dart | 10 +- lib/core/viewModels/base_view_model.dart | 4 +- lib/core/viewModels/dashboard_view_model.dart | 2 +- .../viewModels/er/am_request_view_model.dart | 2 +- lib/core/viewModels/er/rrt-view-model.dart | 10 +- lib/core/viewModels/hospital_view_model.dart | 2 +- .../viewModels/insurance_card_View_model.dart | 14 +- .../medical/ask_doctor_view_model.dart | 2 +- .../medical/my_doctor_view_model.dart | 4 +- .../viewModels/notifications_view_model.dart | 2 +- .../offers_Categorise_view_model.dart | 8 +- .../viewModels/pharmacies_view_model.dart | 12 +- .../pharmacyModule/OrderPreviewViewModel.dart | 60 ++++---- .../PharmacyAddressesViewModel.dart | 18 +-- .../pharmacyModule/PrescriptionViewModel.dart | 2 +- .../pharmacyModule/brand_view_model.dart | 8 +- .../lacum-registration-viewModel.dart | 15 +- .../lacum-trasnfer-viewModel.dart | 6 +- .../pharmacyModule/lacum-viewmodel.dart | 37 ++--- .../order_model_view_model.dart | 12 +- .../pharmacy_module_view_model.dart | 16 +- .../product_detail_view_model.dart | 30 ++-- .../pharmacyModule/review_view_model.dart | 2 +- .../tems-condition-viewmodel.dart | 4 +- .../pharmacyModule/wishlist_view_model.dart | 2 +- .../pharmacy_categorise_view_model.dart | 80 +++++----- .../product_categories_view_model.dart | 2 +- lib/core/viewModels/project_view_model.dart | 28 ++-- lib/core/viewModels/qr_view_model.dart | 10 +- lib/core/viewModels/vaccine_view_model.dart | 16 +- .../weather/weather_view_model.dart | 2 +- lib/extensions/list_extension.dart | 2 +- .../OfferCategoriesResponseModel_helper.dart | 20 +-- .../OfferProductsResponseModel_helper.dart | 50 +++---- .../json/base/json_convert_content.dart | 66 ++++++--- .../AppoimentAllHistoryResultList.dart | 116 +++++++-------- .../DentalChiefComplaintsModel.dart | 16 +- .../Appointments/DentalProceduresModel.dart | 20 +-- .../Appointments/DoctorListResponse.dart | 82 +++++------ lib/models/Appointments/DoctorProfile.dart | 58 ++++---- .../InsertAppointmentRequest.dart | 30 ++-- .../OBGyneProcedureListResponse.dart | 62 ++++---- .../Appointments/PatientShareResposne.dart | 54 +++---- lib/models/Appointments/SearchInfoModel.dart | 20 +-- .../Appointments/appoDetailsButtons.dart | 8 +- .../Appointments/doctor_pre_post_image.dart | 38 ++--- lib/models/Appointments/laser_body_parts.dart | 26 ++-- lib/models/Appointments/timeSlot.dart | 8 +- .../Appointments/toDoCountProviderModel.dart | 12 +- .../Authentication/authenticated_user.dart | 84 +++++------ .../check_activation_code_request.dart | 46 +++--- ...heck_activation_code_request_register.dart | 53 +++---- .../check_activation_code_response.dart | 138 +++++++++--------- .../check_paitent_authentication_req.dart | 36 ++--- .../check_user_status_reponse.dart | 80 +++++----- .../Authentication/check_user_status_req.dart | 22 +-- .../checkpatient_for_registration.dart | 32 ++-- lib/models/Authentication/countries_list.dart | 4 +- .../get_mobile_info_request.dart | 40 ++--- .../get_mobile_info_response.dart | 70 ++++----- .../insert_device_imei_request.dart | 30 ++-- .../register_info_response.dart | 80 +++++----- .../Authentication/register_user_requet.dart | 70 ++++----- .../registered_authenticated_user_req.dart | 46 +++--- .../select_device_imei_res.dart | 28 ++-- .../send_activation_request.dart | 58 ++++---- lib/models/Clinics/ClinicListResponse.dart | 24 +-- .../CovidPaymentInfoResponse.dart | 6 +- .../CovidTestProceduresResponse.dart | 10 +- .../DriveThroughTestingCenterModel.dart | 24 +-- .../GetAllSharedRecordByStatusResponse.dart | 108 +++++++------- .../GetAllSharedRecordsByStatusReq.dart | 28 ++-- .../PatientERVirtualHistoryResponse.dart | 42 +++--- .../LiveCare/ApplePayInsertRequest.dart | 136 ++++++++--------- .../ClinicsServiceTimingsResponse.dart | 38 ++--- .../ambulanceRequest/locationDetails.dart | 12 +- .../ancillary_order_list_model.dart | 40 ++--- .../ancillary_order_proc_model.dart | 72 ++++----- .../ancillary_orders_proc_list.dart | 4 +- .../insurance/getInsuranceCompaniesModel.dart | 26 ++-- .../insuranceCompaniesSchemeModel.dart | 56 +++---- 101 files changed, 1373 insertions(+), 1358 deletions(-) diff --git a/lib/core/model/packages_offers/requests/CreateCustomerRequestModel.dart b/lib/core/model/packages_offers/requests/CreateCustomerRequestModel.dart index b3a3d3f6..58161886 100644 --- a/lib/core/model/packages_offers/requests/CreateCustomerRequestModel.dart +++ b/lib/core/model/packages_offers/requests/CreateCustomerRequestModel.dart @@ -21,7 +21,7 @@ class PackagesCustomerRequestModel { this.phone = user.mobileNumber; this.national_id = user.patientIdentificationNo; - String isoDateTime = DateUtil.getISODateFormat(user.dateofBirthDataTime); + String isoDateTime = DateUtil.getISODateFormat(user.dateofBirthDataTime!); this.date_of_birth = isoDateTime; } diff --git a/lib/core/service/AlHabibMedicalService/H2O_service.dart b/lib/core/service/AlHabibMedicalService/H2O_service.dart index 29a6aac8..e909bbda 100644 --- a/lib/core/service/AlHabibMedicalService/H2O_service.dart +++ b/lib/core/service/AlHabibMedicalService/H2O_service.dart @@ -18,7 +18,7 @@ class H2OService extends BaseService { Future getUserDetail() async { userProgressRequestModel.progress = 1; - userProgressRequestModel.mobileNumber = user.mobileNumber.substring(1); + userProgressRequestModel.mobileNumber = user.mobileNumber!.substring(1); userProgressRequestModel.identificationNo = user.patientIdentificationNo; hasError = false; @@ -32,7 +32,7 @@ class H2OService extends BaseService { Future updateUserDetail(UserDetailModel userDetail) async { userProgressRequestModel.progress = 1; - userProgressRequestModel.mobileNumber = user.mobileNumber.substring(1); + userProgressRequestModel.mobileNumber = user.mobileNumber!.substring(1); userProgressRequestModel.identificationNo = user.patientIdentificationNo; UserDetailRequestModel _requestModel = UserDetailRequestModel(); @@ -75,7 +75,7 @@ class H2OService extends BaseService { Future getUserProgressForTodayData() async { userProgressRequestModel.progress = 1; - userProgressRequestModel.mobileNumber = user.mobileNumber.substring(1); + userProgressRequestModel.mobileNumber = user.mobileNumber!.substring(1); userProgressRequestModel.identificationNo = user.patientIdentificationNo; hasError = false; @@ -92,7 +92,7 @@ class H2OService extends BaseService { Future getUserProgressForWeekData() async { userProgressRequestModel.progress = 2; - userProgressRequestModel.mobileNumber = super.user.mobileNumber.substring(1); + userProgressRequestModel.mobileNumber = super.user.mobileNumber!.substring(1); userProgressRequestModel.identificationNo = super.user.patientIdentificationNo; hasError = false; @@ -109,7 +109,7 @@ class H2OService extends BaseService { Future getUserProgressForMonthData() async { userProgressRequestModel.progress = 3; - userProgressRequestModel.mobileNumber = super.user.mobileNumber.substring(1); + userProgressRequestModel.mobileNumber = super.user.mobileNumber!.substring(1); userProgressRequestModel.identificationNo = super.user.patientIdentificationNo; hasError = false; @@ -139,7 +139,7 @@ class H2OService extends BaseService { Future undoUserActivity() async { userProgressRequestModel.progress = 1; - userProgressRequestModel.mobileNumber = user.mobileNumber.substring(1); + userProgressRequestModel.mobileNumber = user.mobileNumber!.substring(1); userProgressRequestModel.identificationNo = user.patientIdentificationNo; hasError = false; diff --git a/lib/core/service/appointment_rate_service.dart b/lib/core/service/appointment_rate_service.dart index b02f809c..73fc587c 100644 --- a/lib/core/service/appointment_rate_service.dart +++ b/lib/core/service/appointment_rate_service.dart @@ -67,7 +67,7 @@ class AppointmentRateService extends BaseService { "DoctorName": docName, "ProjectName": projectName, "COCTypeName": 1, - "PatientName": authenticatedUserObject.user!.firstName + " " + authenticatedUserObject.user!.lastName, + "PatientName": authenticatedUserObject.user!.firstName! + " " + authenticatedUserObject.user!.lastName!, "PatientOutSA": authenticatedUserObject.user!.outSA, "PatientTypeID": authenticatedUserObject.user!.patientType, "ClinicName": clinicName, diff --git a/lib/core/service/er/EdOnlineServices.dart b/lib/core/service/er/EdOnlineServices.dart index 56de8873..71beec0b 100644 --- a/lib/core/service/er/EdOnlineServices.dart +++ b/lib/core/service/er/EdOnlineServices.dart @@ -46,7 +46,7 @@ class EdOnlineServices extends BaseService { body['ProjectId'] = projectId; int riskScore = 0; - if (user.age > 14) { + if (user.age! > 14) { selectedQuestions!.forEach((element) { int score = int.parse((element.adultPoints! != "" ? element.adultPoints! : "0")); riskScore += score; diff --git a/lib/core/service/feedback/feedback_service.dart b/lib/core/service/feedback/feedback_service.dart index 4a9a0022..a6ca0cb0 100644 --- a/lib/core/service/feedback/feedback_service.dart +++ b/lib/core/service/feedback/feedback_service.dart @@ -22,10 +22,10 @@ class FeedbackService extends BaseService { _requestInsertCOCItem.details = details; _requestInsertCOCItem.cOCTypeName = cOCTypeName; _requestInsertCOCItem.formTypeID = cOCTypeName; - _requestInsertCOCItem.mobileNo = "966" + Utils.getPhoneNumberWithoutZero(user.mobileNumber); + _requestInsertCOCItem.mobileNo = "966" + Utils.getPhoneNumberWithoutZero(user.mobileNumber!); _requestInsertCOCItem.isUserLoggedIn = true; _requestInsertCOCItem.projectID = user.projectID; - _requestInsertCOCItem.patientName = user.firstName + " " + user.lastName; + _requestInsertCOCItem.patientName = user.firstName! + " " + user.lastName!; _requestInsertCOCItem.fileName = ""; _requestInsertCOCItem.appVersion = VERSION_ID; _requestInsertCOCItem.uILanguage = languageID; //TODO Change it to be dynamic @@ -34,7 +34,7 @@ class FeedbackService extends BaseService { _requestInsertCOCItem.resolution = "400x847"; _requestInsertCOCItem.projectID = 0; _requestInsertCOCItem.tokenID = "C0c@@dm!n?T&A&A@Barcha202029582948"; - _requestInsertCOCItem.identificationNo = int.parse(user.patientIdentificationNo); + _requestInsertCOCItem.identificationNo = int.parse(user.patientIdentificationNo!); if (BASE_URL.contains('uat')) { _requestInsertCOCItem.forDemo = true; } else { @@ -62,7 +62,7 @@ class FeedbackService extends BaseService { hasError = false; Map body = new Map(); body['IdentificationNo'] = user.patientIdentificationNo; - body['MobileNo'] = "966" + Utils.getPhoneNumberWithoutZero(user.mobileNumber); + body['MobileNo'] = "966" + Utils.getPhoneNumberWithoutZero(user.mobileNumber!); body['Searching_type'] = 1; if (BASE_URL.contains('uat')) { diff --git a/lib/core/service/insurance_service.dart b/lib/core/service/insurance_service.dart index ec434c78..a7102b91 100644 --- a/lib/core/service/insurance_service.dart +++ b/lib/core/service/insurance_service.dart @@ -68,7 +68,7 @@ class InsuranceCardService extends BaseService { }, body: Map()); } - Future getInsuranceApproval({required int appointmentNo}) async { + Future getInsuranceApproval({int? appointmentNo}) async { hasError = false; if (appointmentNo != null) { _requestInsuranceApprovalModel.appointmentNo = appointmentNo; diff --git a/lib/core/service/medical/EyeService.dart b/lib/core/service/medical/EyeService.dart index 71dfdec4..40ae1b08 100644 --- a/lib/core/service/medical/EyeService.dart +++ b/lib/core/service/medical/EyeService.dart @@ -29,7 +29,7 @@ class EyeService extends BaseService { Map body = Map(); body['isDentalAllowedBackend'] = false; body['PatientIditificationNum'] = user.patientIdentificationNo; - body['PatientName'] = user.firstName + " " + user.lastName; + body['PatientName'] = user.firstName! + " " + user.lastName!; body['To'] = user.emailAddress; body['SetupID'] = user.setupID; body['DateofBirth'] = user.dateofBirth; @@ -37,7 +37,7 @@ class EyeService extends BaseService { body['AppointmentNo'] = appointmentNo; body['ProjectName'] = projectName; body['PatientID'] = user.patientID; - body['PatientMobileNumber'] = Utils.getPhoneNumberWithoutZero(user.mobileNumber); + body['PatientMobileNumber'] = Utils.getPhoneNumberWithoutZero(user.mobileNumber!); await baseAppClient.post(SEND_REPORT_EYE_EMAIL, onSuccess: (response, statusCode) async {}, onFailure: (String error, int statusCode) { hasError = true; super.error = error; @@ -51,7 +51,7 @@ class EyeService extends BaseService { body['isDentalAllowedBackend'] = false; body['AppointmentNo'] = appointmentNo; body['PatientIditificationNum'] = user.patientIdentificationNo; - body['PatientName'] = user.firstName + " " + user.lastName; + body['PatientName'] = user.firstName! + " " + user.lastName!; body['To'] = user.emailAddress; body['SetupID'] = user.setupID; body['DateofBirth'] = user.dateofBirth; @@ -59,7 +59,7 @@ class EyeService extends BaseService { body['AppointmentNo'] = appointmentNo; body['ProjectName'] = projectName; body['PatientID'] = user.patientID; - body['PatientMobileNumber'] = Utils.getPhoneNumberWithoutZero(user.mobileNumber); + body['PatientMobileNumber'] = Utils.getPhoneNumberWithoutZero(user.mobileNumber!); await baseAppClient.post(SEND_CONTACT_LENS_PRESCRIPTION_EMAIL, onSuccess: (response, statusCode) async {}, onFailure: (String error, int statusCode) { hasError = true; super.error = error; diff --git a/lib/core/service/medical/PatientSickLeaveService.dart b/lib/core/service/medical/PatientSickLeaveService.dart index 17ca1e8e..656d2d5f 100644 --- a/lib/core/service/medical/PatientSickLeaveService.dart +++ b/lib/core/service/medical/PatientSickLeaveService.dart @@ -34,7 +34,7 @@ class PatientSickLeaveService extends BaseService { body['DateofBirth'] = user.dateofBirth; body['PatientIditificationNum'] = user.patientIdentificationNo; body['PatientMobileNumber'] = user.mobileNumber; - body['PatientName'] = user.firstName + " " + user.firstName; + body['PatientName'] = user.firstName! + " " + user.firstName!; body['ProjectName'] = projectName; body['DoctorName'] = doctorName; body['ProjectID'] = projectID; diff --git a/lib/core/service/medical/labs_service.dart b/lib/core/service/medical/labs_service.dart index c39db57a..8754e124 100644 --- a/lib/core/service/medical/labs_service.dart +++ b/lib/core/service/medical/labs_service.dart @@ -207,7 +207,7 @@ class LabsService extends BaseService { _requestSendLabReportEmail.invoiceNoVP = isVidaPlus ? patientLabOrder.invoiceNo : "0"; _requestSendLabReportEmail.doctorName = patientLabOrder.doctorName; _requestSendLabReportEmail.clinicName = patientLabOrder.clinicDescription; - _requestSendLabReportEmail.patientName = userObj!.firstName + " " + userObj.lastName; + _requestSendLabReportEmail.patientName = userObj!.firstName! + " " + userObj.lastName!; _requestSendLabReportEmail.patientIditificationNum = userObj.patientIdentificationNo; _requestSendLabReportEmail.dateofBirth = userObj.dateofBirth; _requestSendLabReportEmail.to = userObj.emailAddress; diff --git a/lib/core/service/medical/prescriptions_service.dart b/lib/core/service/medical/prescriptions_service.dart index 672976cf..71a24a39 100644 --- a/lib/core/service/medical/prescriptions_service.dart +++ b/lib/core/service/medical/prescriptions_service.dart @@ -132,7 +132,7 @@ class PrescriptionsService extends BaseService { _requestSendPrescriptionEmail.patientIditificationNum = user.patientIdentificationNo; _requestSendPrescriptionEmail.patientMobileNumber = user.mobileNumber; _requestSendPrescriptionEmail.doctorID = doctorID; - _requestSendPrescriptionEmail.patientName = user.firstName + " " + user.lastName; + _requestSendPrescriptionEmail.patientName = user.firstName! + " " + user.lastName!; _requestSendPrescriptionEmail.setupID = user.setupID; _requestSendPrescriptionEmail.to = user.emailAddress; hasError = false; diff --git a/lib/core/service/medical/radiology_service.dart b/lib/core/service/medical/radiology_service.dart index 548cb69d..2239de8d 100644 --- a/lib/core/service/medical/radiology_service.dart +++ b/lib/core/service/medical/radiology_service.dart @@ -74,7 +74,7 @@ class RadiologyService extends BaseService { _requestSendRadReportEmail.orderDate = '${finalRadiology.orderDate!.year}-${finalRadiology.orderDate!.month}-${finalRadiology.orderDate!.day}'; _requestSendRadReportEmail.patientIditificationNum = userObj!.patientIdentificationNo; _requestSendRadReportEmail.patientMobileNumber = userObj.mobileNumber; - _requestSendRadReportEmail.patientName = userObj.firstName + " " + userObj.lastName; + _requestSendRadReportEmail.patientName = userObj.firstName! + " " + userObj.lastName!; _requestSendRadReportEmail.projectName = finalRadiology.projectName; _requestSendRadReportEmail.radResult = finalRadiology.reportData; _requestSendRadReportEmail.to = userObj.emailAddress; diff --git a/lib/core/service/medical/reports_service.dart b/lib/core/service/medical/reports_service.dart index 8e632627..d8874d7d 100644 --- a/lib/core/service/medical/reports_service.dart +++ b/lib/core/service/medical/reports_service.dart @@ -159,12 +159,12 @@ class ReportsService extends BaseService { body['DateofBirth'] = user.dateofBirth; body['PatientIditificationNum'] = user.patientIdentificationNo; body['PatientMobileNumber'] = user.mobileNumber; - body['PatientName'] = user.firstName + " " + user.lastName; + body['PatientName'] = user.firstName! + " " + user.lastName!; body['ProjectName'] = projectName; body['ClinicName'] = clinicName; body['ProjectID'] = projectID; body['InvoiceNo'] = invoiceNo; - body['PrintedByName'] = user.firstName + " " + user.lastName; + body['PrintedByName'] = user.firstName! + " " + user.lastName!; dynamic response; @@ -189,12 +189,12 @@ class ReportsService extends BaseService { body['DateofBirth'] = user.dateofBirth; body['PatientIditificationNum'] = user.patientIdentificationNo; body['PatientMobileNumber'] = user.mobileNumber; - body['PatientName'] = user.firstName + " " + user.lastName; + body['PatientName'] = user.firstName! + " " + user.lastName!; body['ProjectName'] = projectName; body['ClinicName'] = clinicName; body['ProjectID'] = projectID; body['InvoiceNo'] = invoiceNo; - body['PrintedByName'] = user.firstName + " " + user.lastName; + body['PrintedByName'] = user.firstName! + " " + user.lastName!; dynamic response; diff --git a/lib/core/service/parmacyModule/parmacy_module_service.dart b/lib/core/service/parmacyModule/parmacy_module_service.dart index 863984b0..2490f231 100644 --- a/lib/core/service/parmacyModule/parmacy_module_service.dart +++ b/lib/core/service/parmacyModule/parmacy_module_service.dart @@ -73,7 +73,7 @@ class PharmacyModuleService extends BaseService { await getUser(); Map queryParams = { 'Filenumber': user.patientID.toString(), - 'MobileNumber': Utils.getPhoneNumberWithoutZero(user.mobileNumber), + 'MobileNumber': Utils.getPhoneNumberWithoutZero(user.mobileNumber!), }; hasError = false; try { diff --git a/lib/core/service/vaccine_service.dart b/lib/core/service/vaccine_service.dart index 45046428..30cff48d 100644 --- a/lib/core/service/vaccine_service.dart +++ b/lib/core/service/vaccine_service.dart @@ -36,7 +36,7 @@ class VaccineService extends BaseService { body['DateofBirth'] = user.dateofBirth; body['PatientIditificationNum'] = user.patientIdentificationNo; body['PatientMobileNumber'] = user.mobileNumber; - body['PatientName'] = user.firstName + " " + user.lastName; + body['PatientName'] = user.firstName! + " " + user.lastName!; hasError = false; diff --git a/lib/core/viewModels/AlHabibMedicalService/H2O_view_model.dart b/lib/core/viewModels/AlHabibMedicalService/H2O_view_model.dart index aa424b46..91e09c0a 100644 --- a/lib/core/viewModels/AlHabibMedicalService/H2O_view_model.dart +++ b/lib/core/viewModels/AlHabibMedicalService/H2O_view_model.dart @@ -153,8 +153,8 @@ class H2OViewModel extends BaseViewModel { Future insertUserActivity(InsertUserActivityRequestModel insertUserActivityRequestModel) async { setState(ViewState.BusyLocal); - insertUserActivityRequestModel.mobileNumber = user.mobileNumber.substring(1); - insertUserActivityRequestModel.identificationNo = user.patientIdentificationNo; + insertUserActivityRequestModel.mobileNumber = user!.mobileNumber.substring(1); + insertUserActivityRequestModel.identificationNo = user!.patientIdentificationNo; await _h2OService.insertUserActivity(insertUserActivityRequestModel); if (_h2OService.hasError) { diff --git a/lib/core/viewModels/AlHabibMedicalService/cmc_view_model.dart b/lib/core/viewModels/AlHabibMedicalService/cmc_view_model.dart index 9ed243fc..0d450526 100644 --- a/lib/core/viewModels/AlHabibMedicalService/cmc_view_model.dart +++ b/lib/core/viewModels/AlHabibMedicalService/cmc_view_model.dart @@ -94,7 +94,7 @@ class CMCViewModel extends BaseViewModel { Future insertPresPresOrder({required CMCInsertPresOrderRequestModel order}) async { setState(ViewState.Busy); - order.createdBy = user.patientID; + order.createdBy = user!.patientID; order.orderServiceID = OrderService.Comprehensive_Medical_Checkup.getIdOrderService(); String requestId = await _cMCService.insertPresPresOrder(order: order); if (_cMCService.hasError) { @@ -108,7 +108,7 @@ class CMCViewModel extends BaseViewModel { Future insertCMCOrderRC({required CMCInsertPresOrderRequestModel order}) async { setState(ViewState.Busy); - order.createdBy = user.patientID; + order.createdBy = user!.patientID; order.orderServiceID = OrderService.Comprehensive_Medical_Checkup.getIdOrderService(); String requestId = await _cMCService.insertCMCOrderRC(order: order); if (_cMCService.hasError) { diff --git a/lib/core/viewModels/AlHabibMedicalService/home_health_care_view_model.dart b/lib/core/viewModels/AlHabibMedicalService/home_health_care_view_model.dart index 0b7caa28..52091f28 100644 --- a/lib/core/viewModels/AlHabibMedicalService/home_health_care_view_model.dart +++ b/lib/core/viewModels/AlHabibMedicalService/home_health_care_view_model.dart @@ -85,7 +85,7 @@ class HomeHealthCareViewModel extends BaseViewModel { Future insertPresPresOrder({required PatientERInsertPresOrderRequestModel order}) async { setState(ViewState.Busy); - order.createdBy = user.patientID; + order.createdBy = user!.patientID; order.orderServiceID = OrderService.HOME_HEALTH_CARE.getIdOrderService(); // await _homeHealthCareService.insertPresPresOrder(order: order); await _homeHealthCareService.insertHHCOrderRC(order: order); diff --git a/lib/core/viewModels/PharmacyPagesViewModel.dart b/lib/core/viewModels/PharmacyPagesViewModel.dart index 41c43066..7d26fbcf 100644 --- a/lib/core/viewModels/PharmacyPagesViewModel.dart +++ b/lib/core/viewModels/PharmacyPagesViewModel.dart @@ -2,15 +2,15 @@ import 'package:flutter/cupertino.dart'; class PharmacyPagesViewModel with ChangeNotifier { int currentTab = 0; - PageController pageController; + PageController? pageController; PharmacyPagesViewModel() { pageController = PageController(keepPage: true); } changeCurrentTab(int tab) { - if (pageController.hasClients) { + if (pageController!.hasClients) { currentTab = tab; - pageController.jumpToPage(tab); + pageController!.jumpToPage(tab); notifyListeners(); } } diff --git a/lib/core/viewModels/TermsConditionsViewModel.dart b/lib/core/viewModels/TermsConditionsViewModel.dart index 0cd667cf..f458ce9f 100644 --- a/lib/core/viewModels/TermsConditionsViewModel.dart +++ b/lib/core/viewModels/TermsConditionsViewModel.dart @@ -14,7 +14,7 @@ class TermsConditionsViewModel extends BaseViewModel{ setState(ViewState.Busy); await _service.getUserTermsAndConditions(); if (_service.hasError) { - error = _service.error; + error = _service.error!; setState(ViewState.Error); } else { setState(ViewState.Idle); diff --git a/lib/core/viewModels/ancillary_orders_view_model.dart b/lib/core/viewModels/ancillary_orders_view_model.dart index 0d846313..8d601f20 100644 --- a/lib/core/viewModels/ancillary_orders_view_model.dart +++ b/lib/core/viewModels/ancillary_orders_view_model.dart @@ -21,7 +21,7 @@ class AnciallryOrdersViewModel extends BaseViewModel { setState(ViewState.Busy); await _ancillaryService.getOrders(); if (_ancillaryService.hasError) { - error = _ancillaryService.error; + error = _ancillaryService.error!; setState(ViewState.ErrorLocal); } else setState(ViewState.Idle); @@ -32,7 +32,7 @@ class AnciallryOrdersViewModel extends BaseViewModel { setState(ViewState.Busy); await _ancillaryService.getOrdersDetails(appointmentNo, orderNo, projectID ); if (_ancillaryService.hasError) { - error = _ancillaryService.error; + error = _ancillaryService.error!; setState(ViewState.ErrorLocal); } else setState(ViewState.Idle); diff --git a/lib/core/viewModels/appointment_rate_view_model.dart b/lib/core/viewModels/appointment_rate_view_model.dart index 9e0d338b..509a3d65 100644 --- a/lib/core/viewModels/appointment_rate_view_model.dart +++ b/lib/core/viewModels/appointment_rate_view_model.dart @@ -10,14 +10,14 @@ class AppointmentRateViewModel extends BaseViewModel { AppointmentRateService _appointmentRateService = locator(); bool isHaveAppointmentNotRate = false; - AppointmentDetails get appointmentDetails => _appointmentRateService.appointmentDetails; + AppointmentDetails get appointmentDetails => _appointmentRateService.appointmentDetails!; Future getIsLastAppointmentRatedList() async { isHaveAppointmentNotRate = false; setState(ViewState.Busy); await _appointmentRateService.getIsLastAppointmentRatedList(); if (_appointmentRateService.hasError) { - error = _appointmentRateService.error; + error = _appointmentRateService.error!; setState(ViewState.Error); } else { if (_appointmentRateService.appointmentRatedList.length > 0) await getAppointmentDetails(); @@ -27,7 +27,7 @@ class AppointmentRateViewModel extends BaseViewModel { getAppointmentDetails() async { await _appointmentRateService.getAppointmentDetails(); if (_appointmentRateService.hasError) { - error = _appointmentRateService.error; + error = _appointmentRateService.error!; setState(ViewState.Error); } else { if (_appointmentRateService.appointmentDetails != null) isHaveAppointmentNotRate = true; @@ -39,7 +39,7 @@ class AppointmentRateViewModel extends BaseViewModel { setState(ViewState.Busy); await _appointmentRateService.sendAppointmentRate(rate, appointmentNo, projectID, doctorID, clinicID, note); if (_appointmentRateService.hasError) { - error = _appointmentRateService.error; + error = _appointmentRateService.error!; setState(ViewState.ErrorLocal); } else { setState(ViewState.Idle); @@ -51,7 +51,7 @@ class AppointmentRateViewModel extends BaseViewModel { setState(ViewState.Busy); await _appointmentRateService.sendDoctorRate(rate, appointmentNo, projectID, doctorID, clinicID, note, appoDate, docName, projectName, clinicName); if (_appointmentRateService.hasError) { - error = _appointmentRateService.error; + error = _appointmentRateService.error!; setState(ViewState.ErrorLocal); } else { setState(ViewState.Idle); diff --git a/lib/core/viewModels/base_view_model.dart b/lib/core/viewModels/base_view_model.dart index 98fb0b17..6f3cebc3 100644 --- a/lib/core/viewModels/base_view_model.dart +++ b/lib/core/viewModels/base_view_model.dart @@ -17,7 +17,7 @@ class BaseViewModel extends ChangeNotifier { String error = ""; String languageID = "en"; - AuthenticatedUser user; + AuthenticatedUser? user; AppSharedPreferences sharedPref = AppSharedPreferences(); AuthenticatedUserObject authenticatedUserObject = locator(); @@ -36,7 +36,7 @@ class BaseViewModel extends ChangeNotifier { BaseViewModel() { //authenticatedUserObject.getUser(); - user = authenticatedUserObject.user; + user = authenticatedUserObject.user!; this.isLogin = authenticatedUserObject.isLogin; } diff --git a/lib/core/viewModels/dashboard_view_model.dart b/lib/core/viewModels/dashboard_view_model.dart index 931e94b3..b3b85269 100644 --- a/lib/core/viewModels/dashboard_view_model.dart +++ b/lib/core/viewModels/dashboard_view_model.dart @@ -24,7 +24,7 @@ class DashboardViewModel extends BaseViewModel { booldType = await sharedPref.getString(BLOOD_TYPE) ?? "-"; if (_vitalSignService.hasError) { - error = _vitalSignService.error; + error = _vitalSignService.error!; setState(ViewState.ErrorLocal); } else { booldType = await sharedPref.getString(BLOOD_TYPE) ?? "-"; diff --git a/lib/core/viewModels/er/am_request_view_model.dart b/lib/core/viewModels/er/am_request_view_model.dart index 35ff8053..56056216 100644 --- a/lib/core/viewModels/er/am_request_view_model.dart +++ b/lib/core/viewModels/er/am_request_view_model.dart @@ -106,7 +106,7 @@ class AmRequestViewModel extends BaseViewModel { Future updatePressOrder({required int presOrderID}) async { setState(ViewState.Busy); // await _amService.updatePressOrder(presOrderID: presOrderID); - await _amService.updatePressOrderRC(presOrderID: presOrderID, patientID: authenticatedUserObject.user!.patientID); + await _amService.updatePressOrderRC(presOrderID: presOrderID, patientID: authenticatedUserObject.user!.patientID!); if (_amService.hasError) { error = _amService.error!; setState(ViewState.Error); diff --git a/lib/core/viewModels/er/rrt-view-model.dart b/lib/core/viewModels/er/rrt-view-model.dart index d3aa2b2a..a130ba20 100644 --- a/lib/core/viewModels/er/rrt-view-model.dart +++ b/lib/core/viewModels/er/rrt-view-model.dart @@ -48,9 +48,9 @@ class RRTViewModel extends BaseViewModel { } Future createOrder(Map body) async { - body['IdentificationNo'] = user.patientIdentificationNo; - body['NationalityID'] = user.nationalityID; - body['CreatedBy'] = user.patientIdentificationType; + body['IdentificationNo'] = user!.patientIdentificationNo; + body['NationalityID'] = user!.nationalityID; + body['CreatedBy'] = user!.patientIdentificationType; body['OrderServiceID'] = 5; var localRes; int requestNo; @@ -153,7 +153,7 @@ class RRTViewModel extends BaseViewModel { } Future getServicePrice() async { - Map body = {"IdentificationNo": user.patientIdentificationNo}; + Map body = {"IdentificationNo": user!.patientIdentificationNo}; ServicePrice servicePrice; await _service.baseAppClient.post(GET_RRT_SERVICE_PRICE, body: body, onSuccess: (response, statusCode) { var data = response['PatientE_RealRRT_GetServicePriceList']; @@ -204,7 +204,7 @@ class RRTViewModel extends BaseViewModel { var token = await sharedPref.getString(PHARMACY_AUTORZIE_TOKEN); if (token == null) await _pharmacy_service.generatePharmacyToken(); - await _pharmacy_service.makeVerifyCustomer({'PatientID': user.patientID.toString()}); + await _pharmacy_service.makeVerifyCustomer({'PatientID': user!.patientID.toString()}); await _pharmacy_address_service.getAddresses(); return _pharmacy_address_service.addresses; } catch (e) { diff --git a/lib/core/viewModels/hospital_view_model.dart b/lib/core/viewModels/hospital_view_model.dart index 66ad4b01..74abe795 100644 --- a/lib/core/viewModels/hospital_view_model.dart +++ b/lib/core/viewModels/hospital_view_model.dart @@ -14,7 +14,7 @@ class HospitalViewModel extends BaseViewModel { setState(ViewState.Busy); await _hospitalService.getHospitals(); if (_hospitalService.hasError) { - error = _hospitalService.error; + error = _hospitalService.error!; setState(ViewState.Error); } else setState(ViewState.Idle); diff --git a/lib/core/viewModels/insurance_card_View_model.dart b/lib/core/viewModels/insurance_card_View_model.dart index a04bbb39..00997eb5 100644 --- a/lib/core/viewModels/insurance_card_View_model.dart +++ b/lib/core/viewModels/insurance_card_View_model.dart @@ -31,7 +31,7 @@ class InsuranceViewModel extends BaseViewModel { setState(ViewState.Busy); await _insuranceCardService.getInsurance(); if (_insuranceCardService.hasError) { - error = _insuranceCardService.error; + error = _insuranceCardService.error!; setState(ViewState.ErrorLocal); } else setState(ViewState.Idle); @@ -43,13 +43,13 @@ class InsuranceViewModel extends BaseViewModel { setState(ViewState.Busy); await _insuranceCardService.getInsuranceUpdate(); if (_insuranceCardService.hasError) { - error = _insuranceCardService.error; + error = _insuranceCardService.error!; setState(ViewState.ErrorLocal); } else getFamilyFiles(); } - Future getInsuranceApproval({int appointmentNo}) async { + Future getInsuranceApproval({ int? appointmentNo}) async { hasError = false; //_insuranceCardService.clearInsuranceCard(); setState(ViewState.Busy); @@ -59,7 +59,7 @@ class InsuranceViewModel extends BaseViewModel { else await _insuranceCardService.getInsuranceApproval(); if (_insuranceCardService.hasError) { - error = _insuranceCardService.error; + error = _insuranceCardService.error!; setState(ViewState.ErrorLocal); } else setState(ViewState.Idle); @@ -68,16 +68,16 @@ class InsuranceViewModel extends BaseViewModel { Future getFamilyFiles() async { await _insuranceCardService.getSharedRecordByStatus(); if (_insuranceCardService.hasError) { - error = _insuranceCardService.error; + error = _insuranceCardService.error!; setState(ViewState.Error); } else setState(ViewState.Idle); } - Future uploadInsuranceCard(BuildContext context, {String patientIdentificationID, int patientID,String image =""}) async { + Future uploadInsuranceCard(BuildContext context, {String? patientIdentificationID, int? patientID,String image =""}) async { setState(ViewState.BusyLocal); await _insuranceCardService.uploadInsuranceCard(context, patientIdentificationID: patientIdentificationID,patientID: patientID,image: image); if (_insuranceCardService.hasError) { - error = _insuranceCardService.error; + error = _insuranceCardService.error!; setState(ViewState.ErrorLocal); } else setState(ViewState.Idle); diff --git a/lib/core/viewModels/medical/ask_doctor_view_model.dart b/lib/core/viewModels/medical/ask_doctor_view_model.dart index 573c375a..5a091234 100644 --- a/lib/core/viewModels/medical/ask_doctor_view_model.dart +++ b/lib/core/viewModels/medical/ask_doctor_view_model.dart @@ -31,7 +31,7 @@ class AskDoctorViewModel extends BaseViewModel { List doctorByClinic = patientDoctorAppointmentListHospital.where((elementClinic) => elementClinic.filterName == element.projectName).toList(); if (doctorByClinic.length != 0) { - patientDoctorAppointmentListHospital[patientDoctorAppointmentListHospital.indexOf(doctorByClinic[0])].patientDoctorAppointmentList.add(element); + patientDoctorAppointmentListHospital[patientDoctorAppointmentListHospital.indexOf(doctorByClinic[0])].patientDoctorAppointmentList!.add(element); } else { patientDoctorAppointmentListHospital.add(PatientDoctorAppointmentList(filterName: element.projectName, patientDoctorAppointment: element)); } diff --git a/lib/core/viewModels/medical/my_doctor_view_model.dart b/lib/core/viewModels/medical/my_doctor_view_model.dart index 2a884455..da070d17 100644 --- a/lib/core/viewModels/medical/my_doctor_view_model.dart +++ b/lib/core/viewModels/medical/my_doctor_view_model.dart @@ -46,7 +46,7 @@ class MyDoctorViewModel extends BaseViewModel { _patientDoctorAppointmentListClinic[ _patientDoctorAppointmentListClinic .indexOf(doctorByClinic[0])] - .patientDoctorAppointmentList + .patientDoctorAppointmentList! .add(element); } else { _patientDoctorAppointmentListClinic.add(PatientDoctorAppointmentList( @@ -65,7 +65,7 @@ class MyDoctorViewModel extends BaseViewModel { if (doctorByHospital.length != 0) { _patientDoctorAppointmentListHospital[_patientDoctorAppointmentListHospital.indexOf(doctorByHospital[0])] - .patientDoctorAppointmentList + .patientDoctorAppointmentList! .add(element); } else { _patientDoctorAppointmentListHospital.add( diff --git a/lib/core/viewModels/notifications_view_model.dart b/lib/core/viewModels/notifications_view_model.dart index 80e89edb..60969a83 100644 --- a/lib/core/viewModels/notifications_view_model.dart +++ b/lib/core/viewModels/notifications_view_model.dart @@ -24,7 +24,7 @@ class NotificationViewModel extends BaseViewModel { await _notificationService.getAllNotifications(getNotificationsRequestModel); if (_notificationService.hasError) { - error = _notificationService.error; + error = _notificationService.error!; setState(ViewState.Error); } else { setState(ViewState.Idle); diff --git a/lib/core/viewModels/offers_Categorise_view_model.dart b/lib/core/viewModels/offers_Categorise_view_model.dart index b63dd553..adfca8cd 100644 --- a/lib/core/viewModels/offers_Categorise_view_model.dart +++ b/lib/core/viewModels/offers_Categorise_view_model.dart @@ -22,19 +22,19 @@ class OffersCategoriseViewModel extends BaseViewModel { setState(ViewState.Busy); await _offersCategoriseService.getOffersCategorise(); if (_offersCategoriseService.hasError) { - error = _offersCategoriseService.error; + error = _offersCategoriseService.error!; setState(ViewState.ErrorLocal); } else await getOffersProducts(); } - Future getOffersProducts({String i}) async { + Future getOffersProducts({String? i}) async { hasError = false; setState(ViewState.Busy); - await _offersCategoriseService.getOffersProducts(id: i); + await _offersCategoriseService.getOffersProducts(id: i!); if (_offersCategoriseService.hasError) { - error = _offersCategoriseService.error; + error = _offersCategoriseService.error!; setState(ViewState.ErrorLocal); } else setState(ViewState.Idle); diff --git a/lib/core/viewModels/pharmacies_view_model.dart b/lib/core/viewModels/pharmacies_view_model.dart index b14da6a4..f6a763b6 100644 --- a/lib/core/viewModels/pharmacies_view_model.dart +++ b/lib/core/viewModels/pharmacies_view_model.dart @@ -15,12 +15,12 @@ class PharmacyViewModel extends BaseViewModel { List get pharmacy => _pharmacyService.medicineItem; List get pharmacyList => _pharmacyService.pharmaciesList; - Future getPharmacies({int id}) async { + Future getPharmacies({int? id}) async { setState(ViewState.Busy); - await _pharmacyService.getPharmaciesList(itemID: id); + await _pharmacyService.getPharmaciesList(itemID: id!); if (_pharmacyService.hasError) { - error = _pharmacyService.error; + error = _pharmacyService.error!; setState(ViewState.Error); } else setState(ViewState.Idle); @@ -29,13 +29,13 @@ class PharmacyViewModel extends BaseViewModel { clearMedicineSearch(){ _pharmacyService.clearMedicineList(); } - Future getMedicine({String name}) async { + Future getMedicine({String? name}) async { hasError = false; _pharmacyService.clearMedicineList(); setState(ViewState.BusyLocal); - await _pharmacyService.getMedicineList(drugName: name); + await _pharmacyService.getMedicineList(drugName: name!); if (_pharmacyService.hasError) { - error = _pharmacyService.error; + error = _pharmacyService.error!; setState(ViewState.ErrorLocal); } else setState(ViewState.Idle); diff --git a/lib/core/viewModels/pharmacyModule/OrderPreviewViewModel.dart b/lib/core/viewModels/pharmacyModule/OrderPreviewViewModel.dart index 20c8a6bc..82abfbf0 100644 --- a/lib/core/viewModels/pharmacyModule/OrderPreviewViewModel.dart +++ b/lib/core/viewModels/pharmacyModule/OrderPreviewViewModel.dart @@ -1,3 +1,5 @@ +import 'dart:convert'; + import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; import 'package:diplomaticquarterapp/core/model/pharmacies/Addresses.dart'; import 'package:diplomaticquarterapp/core/model/pharmacies/LacumAccountInformation.dart'; @@ -17,7 +19,7 @@ class OrderPreviewViewModel extends BaseViewModel { List get addresses => _orderService.addresses; - LacumAccountInformation get lacumInformation => _orderService.lacumInformation; + LacumAccountInformation get lacumInformation => _orderService.lacumInformation!; List get orderListModel => _orderService.orderList; @@ -36,7 +38,7 @@ class OrderPreviewViewModel extends BaseViewModel { setState(ViewState.Busy); await _orderService.getAddresses(); if (_orderService.hasError) { - error = _orderService.error; + error = _orderService.error!; setState(ViewState.Error); } else { getShoppingCart(); @@ -55,7 +57,7 @@ class OrderPreviewViewModel extends BaseViewModel { if (res != null) _handleGetShoppingCartResponse(res); }); if (_orderService.hasError) { - error = _orderService.error; + error = _orderService.error!; // setState(ViewState.Error); } else { if (paymentCheckoutData != null) { @@ -67,12 +69,12 @@ class OrderPreviewViewModel extends BaseViewModel { } } - Future changeProductQuantity(ShoppingCart product) async { + Future changeProductQuantity(ShoppingCart product) async { setState(ViewState.BusyLocal); - var resp = await _orderService.changeProductQuantity(product.id, product); + var resp = await _orderService.changeProductQuantity(product.id!, product); if (_orderService.hasError) { - error = _orderService.error; + error = _orderService.error!; setState(ViewState.ErrorLocal); } else { var object = _handleGetShoppingCartResponse(resp); @@ -83,10 +85,10 @@ class OrderPreviewViewModel extends BaseViewModel { Future deleteProduct(ShoppingCart product) async { setState(ViewState.BusyLocal); - var resp = await _orderService.deleteProduct(product.id); + var resp = await _orderService.deleteProduct(product.id!); var object = _handleGetShoppingCartResponse(resp); if (_orderService.hasError) { - error = _orderService.error; + error = _orderService.error!; setState(ViewState.ErrorLocal); } else { setState(ViewState.Idle); @@ -100,7 +102,7 @@ class OrderPreviewViewModel extends BaseViewModel { _handleGetShoppingCartResponse(res); }); if (_orderService.hasError) { - error = _orderService.error; + error = _orderService.error!; setState(ViewState.Error); } else { setState(ViewState.Idle); @@ -113,7 +115,7 @@ class OrderPreviewViewModel extends BaseViewModel { if (res == null) { error = "response is null"; setState(ViewState.Error); - return null; + return ShoppingCartResponse(); } cartResponse.itemCount = res["item_count"]; cartResponse.quantityCount = res["quantity_count"]; @@ -121,20 +123,21 @@ class OrderPreviewViewModel extends BaseViewModel { cartResponse.subtotalWithVat = res["subtotal_with_vat"]; cartResponse.subtotalVatAmount = res["subtotal_vat_amount"]; cartResponse.subtotalVatRate = res["subtotal_vat_rate"]; - cartResponse.shoppingCarts =[]; + cartResponse.shoppingCarts = []; if (paymentCheckoutData.shippingOption != null) { - totalAdditionalShippingCharge = paymentCheckoutData.shippingOption.rate; - cartResponse.subtotalVatAmount += paymentCheckoutData.shippingOption.rateVat; - cartResponse.totalAmount += (paymentCheckoutData.shippingOption.rate + paymentCheckoutData.shippingOption.rateVat); + totalAdditionalShippingCharge = paymentCheckoutData.shippingOption!.rate!; + cartResponse.subtotalVatAmount = (cartResponse.subtotalVatAmount)! + (paymentCheckoutData.shippingOption!.rateVat!); + cartResponse.totalAmount = (cartResponse.totalAmount)! + (paymentCheckoutData.shippingOption!.rate! + paymentCheckoutData.shippingOption!.rateVat!); + // Changed By Aamir += into ()+() } res["shopping_carts"].forEach((item) { ShoppingCart shoppingCart = ShoppingCart.fromJson(item); - cartResponse.shoppingCarts.add(shoppingCart); - totalAdditionalShippingCharge += shoppingCart.product.additionalShippingCharge; + cartResponse.shoppingCarts!.add(shoppingCart); + totalAdditionalShippingCharge += shoppingCart.product!.additionalShippingCharge!; }); - if (paymentCheckoutData.shippingOption != null) cartResponse.totalAmount = (cartResponse.subtotalWithVat + totalAdditionalShippingCharge + paymentCheckoutData.shippingOption.rateVat); + if (paymentCheckoutData.shippingOption != null) cartResponse.totalAmount = (cartResponse.subtotalWithVat! + totalAdditionalShippingCharge + paymentCheckoutData.shippingOption!.rateVat!); return cartResponse; } @@ -175,10 +178,10 @@ class OrderPreviewViewModel extends BaseViewModel { setState(ViewState.Busy); await _orderService.getLacumAccountInformation(identificationNo); if (_orderService.hasError) { - error = _orderService.error; + error = _orderService.error!; setState(ViewState.Error); } else { - if (_orderService.lacumInformation.yahalaAccountNo != 0) getLacumGroupData(identificationNo); + if (_orderService.lacumInformation!.yahalaAccountNo != 0) getLacumGroupData(identificationNo); } } @@ -186,9 +189,9 @@ class OrderPreviewViewModel extends BaseViewModel { setState(ViewState.Busy); await _orderService.getLacumGroupInformation(identificationNo); paymentCheckoutData.lacumInformation = _orderService.lacumGroupInformation; - paymentCheckoutData.usedLakumPoints = paymentCheckoutData.lacumInformation.lakumInquiryInformationObjVersion.pointsBalanceAmount; + paymentCheckoutData.usedLakumPoints = paymentCheckoutData.lacumInformation!.lakumInquiryInformationObjVersion!.pointsBalanceAmount!; if (_orderService.hasError) { - error = _orderService.error; + error = _orderService.error!; setState(ViewState.Error); } else { setState(ViewState.Idle); @@ -197,12 +200,13 @@ class OrderPreviewViewModel extends BaseViewModel { Future getShippingOption(String identificationNo) async { setState(ViewState.Busy); - await _orderService.getShippingOption(paymentCheckoutData.address).then((res) async { + await _orderService.getShippingOption(paymentCheckoutData.address!).then((res) async { if (_orderService.hasError) { - error = _orderService.error; + error = _orderService.error!; setState(ViewState.Error); } else { - paymentCheckoutData.shippingOption = ShippingOption.fromJson(res); + paymentCheckoutData.shippingOption = ShippingOption.fromJson(res as Map); + //Changed By Aamir Map into Map setState(ViewState.Idle); await getLacumAccountInformation(identificationNo); } @@ -213,9 +217,9 @@ class OrderPreviewViewModel extends BaseViewModel { setState(ViewState.Busy); await pharmacyModuleViewModel.generatePharmacyToken(); - await _orderService.makeOrder(paymentCheckoutData, cartResponse.shoppingCarts, isLakumEnabled); + await _orderService.makeOrder(paymentCheckoutData, cartResponse.shoppingCarts!, isLakumEnabled); if (_orderService.hasError) { - error = _orderService.error; + error = _orderService.error!; setState(ViewState.ErrorLocal); } else { setState(ViewState.Idle); @@ -224,8 +228,8 @@ class OrderPreviewViewModel extends BaseViewModel { bool isCartItemsOutOfStock() { bool outOfStock = false; - for (int i = 0; i < cartResponse.shoppingCarts.length; i++) { - if (cartResponse.shoppingCarts[i].product.stockQuantity == 0) { + for (int i = 0; i < cartResponse.shoppingCarts!.length; i++) { + if (cartResponse.shoppingCarts![i].product!.stockQuantity! == 0) { outOfStock = true; break; } diff --git a/lib/core/viewModels/pharmacyModule/PharmacyAddressesViewModel.dart b/lib/core/viewModels/pharmacyModule/PharmacyAddressesViewModel.dart index ea9af54d..1183cfd5 100644 --- a/lib/core/viewModels/pharmacyModule/PharmacyAddressesViewModel.dart +++ b/lib/core/viewModels/pharmacyModule/PharmacyAddressesViewModel.dart @@ -27,7 +27,7 @@ class PharmacyAddressesViewModel extends BaseViewModel { setState(ViewState.Busy); await _pharmacyAddressService.getAddresses(); if (_pharmacyAddressService.hasError) { - error = _pharmacyAddressService.error; + error = _pharmacyAddressService.error!; setState(ViewState.Error); } else { setState(ViewState.Idle); @@ -35,7 +35,7 @@ class PharmacyAddressesViewModel extends BaseViewModel { } // Future addEditAddress(PickResult value, AddressInfo editedAddress) async { - Future addEditAddress(Placemark selectedPlace, AddressInfo editedAddress, {String latLong}) async { + Future addEditAddress(Placemark selectedPlace, AddressInfo editedAddress, {String? latLong}) async { setState(ViewState.Busy); AddressInfo sendingAddress; @@ -43,9 +43,9 @@ class PharmacyAddressesViewModel extends BaseViewModel { if (editedAddress == null) { sendingAddress = AddressInfo(); sendingAddress.id = "0"; - sendingAddress.firstName = user.firstName; - sendingAddress.lastName = user.lastName; - sendingAddress.email = user.emailAddress; + sendingAddress.firstName = user!.firstName; + sendingAddress.lastName = user!.lastName; + sendingAddress.email = user!.emailAddress; sendingAddress.company = null; } else { sendingAddress = editedAddress; @@ -73,13 +73,13 @@ class PharmacyAddressesViewModel extends BaseViewModel { // }); // sendingAddress.latLong = value.geometry.location.toString(); - await _pharmacyAddressService.getCountries(sendingAddress.country); + await _pharmacyAddressService.getCountries(sendingAddress.country!); sendingAddress.countryId = country.id; sendingAddress.stateProvinceId = null; sendingAddress.address1 = selectedPlace.name; sendingAddress.address2 = selectedPlace.street; - sendingAddress.phoneNumber = user.mobileNumber; - sendingAddress.faxNumber = user.faxNumber; + sendingAddress.phoneNumber = user!.mobileNumber; + sendingAddress.faxNumber = user!.faxNumber; sendingAddress.customerAttributes = ""; sendingAddress.createdOnUtc = DateTime.now().toString(); if (editedAddress == null) { @@ -103,7 +103,7 @@ class PharmacyAddressesViewModel extends BaseViewModel { setState(ViewState.Busy); await _pharmacyAddressService.deleteCustomerAddress(address); if (_pharmacyAddressService.hasError) { - error = _pharmacyAddressService.error; + error = _pharmacyAddressService.error!; setState(ViewState.Error); } else { setState(ViewState.Idle); diff --git a/lib/core/viewModels/pharmacyModule/PrescriptionViewModel.dart b/lib/core/viewModels/pharmacyModule/PrescriptionViewModel.dart index ba71781f..1d0cda79 100644 --- a/lib/core/viewModels/pharmacyModule/PrescriptionViewModel.dart +++ b/lib/core/viewModels/pharmacyModule/PrescriptionViewModel.dart @@ -19,7 +19,7 @@ class PrescriptionViewModel extends BaseViewModel { setState(ViewState.Busy); await _prescriptionService.getPrescription(); if (_prescriptionService.hasError) { - error = _prescriptionService.error; + error = _prescriptionService.error!; setState(ViewState.Error); } else { setState(ViewState.Idle); diff --git a/lib/core/viewModels/pharmacyModule/brand_view_model.dart b/lib/core/viewModels/pharmacyModule/brand_view_model.dart index 6c2a00fc..78a08ed8 100644 --- a/lib/core/viewModels/pharmacyModule/brand_view_model.dart +++ b/lib/core/viewModels/pharmacyModule/brand_view_model.dart @@ -27,7 +27,7 @@ class BrandsViewModel extends BaseViewModel{ await _brandsService.getBrands(); if (_brandsService.hasError) { - error = _brandsService.error; + error = _brandsService.error!; setState(ViewState.ErrorLocal); } else setState(ViewState.Idle); @@ -38,20 +38,20 @@ class BrandsViewModel extends BaseViewModel{ setState(ViewState.Busy); await _topBrandsService.getTopBrands(); if (_topBrandsService.hasError) { - error = _topBrandsService.error; + error = _topBrandsService.error!; setState(ViewState.ErrorLocal); } else setState(ViewState.Idle); } - Future searchProducts({String productName}) async { + Future searchProducts({required String productName}) async { hasError = false; _brandsService.clearSearchList(); setState(ViewState.Busy); await _brandsService.searchProducts(productName: productName); if (_brandsService.hasError) { - error = _brandsService.error; + error = _brandsService.error!; setState(ViewState.ErrorLocal); } else setState(ViewState.Idle); diff --git a/lib/core/viewModels/pharmacyModule/lacum-registration-viewModel.dart b/lib/core/viewModels/pharmacyModule/lacum-registration-viewModel.dart index 49e8df6c..d115845b 100644 --- a/lib/core/viewModels/pharmacyModule/lacum-registration-viewModel.dart +++ b/lib/core/viewModels/pharmacyModule/lacum-registration-viewModel.dart @@ -8,18 +8,18 @@ import 'lacum-viewmodel.dart'; class LacumRegistrationViewModel extends LacumViewModel { LacumRegistrationService _lacumService = locator(); - ListUserAgreement get listUserAgreement => _lacumService.listUserAgreement; + ListUserAgreement get listUserAgreement => _lacumService.listUserAgreement!; Future checkLacumAccountActivation(String patientIdentificationNo) async { setState(ViewState.Busy); await _lacumService.getLacumAccountInformationById(patientIdentificationNo); if (_lacumService.hasError) { - error = _lacumService.error; + error = _lacumService.error!; setState(ViewState.Error); } else { - if(_lacumService.lacumInformation != null){ - if(_lacumService.lacumInformation.yahalaAccountNo == 0){ - error = _lacumService.lacumInformation.errorEndUserMessage; + if (_lacumService.lacumInformation != null) { + if (_lacumService.lacumInformation!.yahalaAccountNo == 0) { + error = _lacumService.lacumInformation!.errorEndUserMessage!; setState(ViewState.Error); } else { setState(ViewState.Idle); @@ -32,7 +32,7 @@ class LacumRegistrationViewModel extends LacumViewModel { setState(ViewState.Busy); await _lacumService.getUserTermsAndConditionsForEPharmcy(); if (_lacumService.hasError) { - error = _lacumService.error; + error = _lacumService.error!; setState(ViewState.Error); } else { setState(ViewState.Idle); @@ -43,7 +43,7 @@ class LacumRegistrationViewModel extends LacumViewModel { setState(ViewState.Busy); await _lacumService.createLakumAccount(name, phone, 0, identificationNo, languageId); if (_lacumService.hasError) { - error = _lacumService.error; + error = _lacumService.error!; setState(ViewState.Error); return 404; } else { @@ -51,5 +51,4 @@ class LacumRegistrationViewModel extends LacumViewModel { return 200; } } - } diff --git a/lib/core/viewModels/pharmacyModule/lacum-trasnfer-viewModel.dart b/lib/core/viewModels/pharmacyModule/lacum-trasnfer-viewModel.dart index cd19a40f..84f7910b 100644 --- a/lib/core/viewModels/pharmacyModule/lacum-trasnfer-viewModel.dart +++ b/lib/core/viewModels/pharmacyModule/lacum-trasnfer-viewModel.dart @@ -8,14 +8,14 @@ import 'lacum-viewmodel.dart'; class LacumTranferViewModel extends LacumViewModel { LacumTransferService _lacumService = locator(); - LacumAccountInformation get lacumReceiverInformation => + LacumAccountInformation? get lacumReceiverInformation => _lacumService.lacumReceiverInformation; Future getLacumGroupDataBuAccountId(String accountId) async { setState(ViewState.Busy); await _lacumService.getLacumGroupDataBuAccountId(accountId); if (_lacumService.hasError) { - error = _lacumService.error; + error = _lacumService.error!; setState(ViewState.Error); } else { setState(ViewState.Idle); @@ -26,7 +26,7 @@ class LacumTranferViewModel extends LacumViewModel { setState(ViewState.Busy); await _lacumService.transferYaHalaLoyaltyPoints(points); if (_lacumService.hasError) { - error = _lacumService.error; + error = _lacumService.error!; setState(ViewState.Error); return 404; } else { diff --git a/lib/core/viewModels/pharmacyModule/lacum-viewmodel.dart b/lib/core/viewModels/pharmacyModule/lacum-viewmodel.dart index 9f624ae5..aa6f28aa 100644 --- a/lib/core/viewModels/pharmacyModule/lacum-viewmodel.dart +++ b/lib/core/viewModels/pharmacyModule/lacum-viewmodel.dart @@ -13,14 +13,11 @@ import '../base_view_model.dart'; class LacumViewModel extends BaseViewModel { LacumService _lacumService = locator(); - LacumAccountInformation get lacumInformation => - _lacumService.lacumInformation; + LacumAccountInformation? get lacumInformation => _lacumService.lacumInformation; - LacumAccountInformation get lacumGroupInformation => - _lacumService.lacumGroupInformation; + LacumAccountInformation? get lacumGroupInformation => _lacumService.lacumGroupInformation; - String get successMsg => - _lacumService.successMsg; + String get successMsg => _lacumService.successMsg; Future getLacumData(String identificationNo) async { await getLacumAccountData(identificationNo); @@ -31,7 +28,7 @@ class LacumViewModel extends BaseViewModel { setState(ViewState.Busy); await _lacumService.getLacumAccountInformation(identificationNo); if (_lacumService.hasError) { - error = _lacumService.error; + error = _lacumService.error!; setState(ViewState.Error); } else { setState(ViewState.Idle); @@ -42,7 +39,7 @@ class LacumViewModel extends BaseViewModel { setState(ViewState.Busy); await _lacumService.getLacumGroupInformation(identificationNo); if (_lacumService.hasError) { - error = _lacumService.error; + error = _lacumService.error!; setState(ViewState.Error); } else { setState(ViewState.Idle); @@ -53,10 +50,10 @@ class LacumViewModel extends BaseViewModel { setState(ViewState.Busy); await _lacumService.makeAccountActivate(); if (_lacumService.hasError) { - error = _lacumService.error; + error = _lacumService.error!; setState(ViewState.Error); } else { - lacumGroupInformation.lakumInquiryInformationObjVersion.accountStatus = "Active"; + lacumGroupInformation?.lakumInquiryInformationObjVersion?.accountStatus = "Active"; getLacumAccountData(identificationNo); } } @@ -65,19 +62,19 @@ class LacumViewModel extends BaseViewModel { setState(ViewState.Busy); await _lacumService.makeAccountDeactivate(); if (_lacumService.hasError) { - error = _lacumService.error; + error = _lacumService.error!; setState(ViewState.Error); } else { - lacumGroupInformation.lakumInquiryInformationObjVersion.accountStatus = "Cancelled"; + lacumGroupInformation!.lakumInquiryInformationObjVersion!.accountStatus = "Cancelled"; getLacumAccountData(identificationNo); } } Future createLakumAccount(String name, String phone) async { setState(ViewState.BusyLocal); - await _lacumService.createLakumAccount(name, phone, lacumInformation.yahalaAccountNo, lacumInformation.identificationNo, null); + await _lacumService.createLakumAccount(name, phone, lacumInformation!.yahalaAccountNo!, lacumInformation!.identificationNo!, null); if (_lacumService.hasError) { - error = _lacumService.error; + error = _lacumService.error!; setState(ViewState.ErrorLocal); } else { setState(ViewState.Idle); @@ -85,28 +82,26 @@ class LacumViewModel extends BaseViewModel { } String formatCreatedDateToString() { - DateTime createdDate = DateUtil.convertStringToDate( - lacumGroupInformation.lakumInquiryInformationObjVersion.createdDate); + DateTime createdDate = DateUtil.convertStringToDate(lacumGroupInformation!.lakumInquiryInformationObjVersion!.createdDate!); return DateUtil.getFormattedDate(createdDate, "MMM dd,yyyy"); } Uint8List convertBase64ToBarCodeImage() { try { - final _byteImage = base64Decode( - lacumGroupInformation.lakumInquiryInformationObjVersion.barCode.split(',').last); + final _byteImage = base64Decode(lacumGroupInformation!.lakumInquiryInformationObjVersion!.barCode!.split(',').last); return _byteImage; } catch (e) { print(e); - return null; + return Uint8List(0); } } - setLakumData(LacumAccountInformation lacumInformation, LacumAccountInformation lacumGroupInformation){ + setLakumData(LacumAccountInformation lacumInformation, LacumAccountInformation lacumGroupInformation) { _lacumService.lacumInformation = lacumInformation; _lacumService.lacumGroupInformation = lacumGroupInformation; } - clearLakumGroupData(){ + clearLakumGroupData() { _lacumService.lacumGroupInformation = null; } } diff --git a/lib/core/viewModels/pharmacyModule/order_model_view_model.dart b/lib/core/viewModels/pharmacyModule/order_model_view_model.dart index 47950b3d..12d79b22 100644 --- a/lib/core/viewModels/pharmacyModule/order_model_view_model.dart +++ b/lib/core/viewModels/pharmacyModule/order_model_view_model.dart @@ -31,7 +31,7 @@ class OrderModelViewModel extends BaseViewModel { OrderPreviewService _orderServices = locator(); List get addresses => _orderServices.addresses; LacumAccountInformation get lacumInformation => - _orderServices.lacumInformation; + _orderServices.lacumInformation!; ShoppingCartResponse cartResponse = ShoppingCartResponse(); PaymentCheckoutData paymentCheckoutData = PaymentCheckoutData(); double totalAdditionalShippingCharge = 0; @@ -42,7 +42,7 @@ class OrderModelViewModel extends BaseViewModel { setState(ViewState.Busy); await _orderService.getOrder(customerId, customerGUID, pageID); if (_orderService.hasError) { - error = _orderService.error; + error = _orderService.error!; setState(ViewState.Error); } else { //order = _orderService.orderList; @@ -54,7 +54,7 @@ class OrderModelViewModel extends BaseViewModel { setState(ViewState.Busy); await _orderDetailsService.getOrderDetails(OrderId, orderGUID); if (_orderDetailsService.hasError) { - error = _orderDetailsService.error; + error = _orderDetailsService.error!; setState(ViewState.Error); } else { setState(ViewState.Idle); @@ -66,7 +66,7 @@ class OrderModelViewModel extends BaseViewModel { setState(ViewState.Busy); // await _orderService.getProductReview(); if (_orderService.hasError) { - error = _orderService.error; + error = _orderService.error!; setState(ViewState.Error); } else { //order = _orderService.orderList; @@ -84,7 +84,7 @@ class OrderModelViewModel extends BaseViewModel { // Navigator.pop(context); }); if (_cancelOrderService.hasError) { - error = _cancelOrderService.error; + error = _cancelOrderService.error!; setState(ViewState.Error); AppToast.showErrorToast(message: error); } else { @@ -102,7 +102,7 @@ class OrderModelViewModel extends BaseViewModel { setState(ViewState.Busy); await _orderDetailsService.makeReview(product, rating, reviewText); if (_orderDetailsService.hasError) { - error = _orderDetailsService.error; + error = _orderDetailsService.error!; setState(ViewState.Error); AppToast.showErrorToast(message: error); } else { diff --git a/lib/core/viewModels/pharmacyModule/pharmacy_module_view_model.dart b/lib/core/viewModels/pharmacyModule/pharmacy_module_view_model.dart index bc869edc..de50b1bc 100644 --- a/lib/core/viewModels/pharmacyModule/pharmacy_module_view_model.dart +++ b/lib/core/viewModels/pharmacyModule/pharmacy_module_view_model.dart @@ -26,7 +26,7 @@ class PharmacyModuleViewModel extends BaseViewModel { setState(ViewState.Busy); await _pharmacyService.generatePharmacyToken(); if (_pharmacyService.hasError) { - error = _pharmacyService.error; + error = _pharmacyService.error!; setState(ViewState.ErrorLocal); } else { setState(ViewState.Idle); @@ -42,7 +42,7 @@ class PharmacyModuleViewModel extends BaseViewModel { await _pharmacyService.makeVerifyCustomer(data); } if (_pharmacyService.hasError) { - error = _pharmacyService.error; + error = _pharmacyService.error!; setState(ViewState.ErrorLocal); } else { setState(ViewState.Idle); @@ -53,7 +53,7 @@ class PharmacyModuleViewModel extends BaseViewModel { setState(ViewState.Busy); await _pharmacyService.createUser(); if (_pharmacyService.hasError) { - error = _pharmacyService.error; + error = _pharmacyService.error!; setState(ViewState.ErrorLocal); } else { setState(ViewState.Idle); @@ -62,11 +62,11 @@ class PharmacyModuleViewModel extends BaseViewModel { Future getBannerList() async { if (bannerList.isEmpty) { - GifLoaderDialogUtils.showMyDialog(locator().navigatorKey.currentContext); + GifLoaderDialogUtils.showMyDialog(locator().navigatorKey.currentContext!); await _pharmacyService.getBannerListList(); - GifLoaderDialogUtils.hideDialog(locator().navigatorKey.currentContext); + GifLoaderDialogUtils.hideDialog(locator().navigatorKey.currentContext!); if (_pharmacyService.hasError) { - error = _pharmacyService.error; + error = _pharmacyService.error!; setState(ViewState.Error); } else setState(ViewState.Idle); @@ -83,7 +83,7 @@ class PharmacyModuleViewModel extends BaseViewModel { images.add('assets/images/pharmacy_module/offers_banner.png'); _pharmacyService.bannerItems.forEach((element) { - images.add(element.src); + images.add(element.src!); }); return images; @@ -93,7 +93,7 @@ class PharmacyModuleViewModel extends BaseViewModel { setState(ViewState.Busy); await _recommendedProductService.getRecommendedProducts(productId); if (_recommendedProductService.hasError) { - error = _recommendedProductService.error; + error = _recommendedProductService.error!; setState(ViewState.Error); } else { setState(ViewState.Idle); diff --git a/lib/core/viewModels/pharmacyModule/product_detail_view_model.dart b/lib/core/viewModels/pharmacyModule/product_detail_view_model.dart index a59c080c..193e6ee6 100644 --- a/lib/core/viewModels/pharmacyModule/product_detail_view_model.dart +++ b/lib/core/viewModels/pharmacyModule/product_detail_view_model.dart @@ -40,7 +40,7 @@ class ProductDetailViewModel extends BaseViewModel { setState(ViewState.Busy); await _productDetailService.getProductReviews(productID); if (_productDetailService.hasError) { - error = _productDetailService.error; + error = _productDetailService.error!; setState(ViewState.ErrorLocal); } else setState(ViewState.Idle); @@ -51,7 +51,7 @@ class ProductDetailViewModel extends BaseViewModel { setState(ViewState.BusyLocal); await _productDetailService.getProductAvailabiltyDetail(productSKU); if (_productDetailService.hasError) { - error = _productDetailService.error; + error = _productDetailService.error!; setState(ViewState.ErrorLocal); } else setState(ViewState.Idle); @@ -62,7 +62,7 @@ class ProductDetailViewModel extends BaseViewModel { setState(ViewState.BusyLocal); await _productDetailService.notifyMe(customerId, itemID); if (_productDetailService.hasError) { - error = _productDetailService.error; + error = _productDetailService.error!; setState(ViewState.ErrorLocal); } else setState(ViewState.Idle); @@ -74,11 +74,11 @@ class ProductDetailViewModel extends BaseViewModel { var resp = await _productDetailService.addToCart(quantity, itemID, context); ShoppingCartResponse object = _handleGetShoppingCartResponse(resp); if (_productDetailService.hasError) { - error = _productDetailService.error; + error = _productDetailService.error!; setState(ViewState.ErrorLocal); } else { setState(ViewState.Idle); - Provider.of(locator().navigatorKey.currentContext, listen: false).setShoppingCartResponse(object); + Provider.of(locator().navigatorKey.currentContext!, listen: false).setShoppingCartResponse(object); } } @@ -88,7 +88,7 @@ class ProductDetailViewModel extends BaseViewModel { if (res == null) { error = "response is null"; setState(ViewState.Error); - return null; + return ShoppingCartResponse(); } print(res); cartResponse.itemCount = res["item_count"]; @@ -100,7 +100,7 @@ class ProductDetailViewModel extends BaseViewModel { cartResponse.shoppingCarts =[]; res["shopping_carts"].forEach((item) { ShoppingCart shoppingCart = ShoppingCart.fromJson(item); - cartResponse.shoppingCarts.add(shoppingCart); + cartResponse.shoppingCarts!.add(shoppingCart); }); return cartResponse; } @@ -108,12 +108,12 @@ class ProductDetailViewModel extends BaseViewModel { Future addToWishlistData(itemID, context) async { hasError = false; setState(ViewState.BusyLocal); - GifLoaderDialogUtils.showMyDialog(locator().navigatorKey.currentContext); + GifLoaderDialogUtils.showMyDialog(locator().navigatorKey.currentContext!); await _productDetailService.addToWishlist(itemID, context); - GifLoaderDialogUtils.hideDialog(locator().navigatorKey.currentContext); + GifLoaderDialogUtils.hideDialog(locator().navigatorKey.currentContext!); if (_productDetailService.hasError) { - error = _productDetailService.error; + error = _productDetailService.error!; setState(ViewState.ErrorLocal); } else setState(ViewState.Idle); @@ -124,7 +124,7 @@ class ProductDetailViewModel extends BaseViewModel { setState(ViewState.Busy); await _productDetailService.getWishlistItems(); if (_productDetailService.hasError) { - error = _productDetailService.error; + error = _productDetailService.error!; setState(ViewState.ErrorLocal); } else setState(ViewState.Idle); @@ -133,12 +133,12 @@ class ProductDetailViewModel extends BaseViewModel { Future deleteWishlistData(itemID, context) async { hasError = false; setState(ViewState.BusyLocal); - GifLoaderDialogUtils.showMyDialog(locator().navigatorKey.currentContext); + GifLoaderDialogUtils.showMyDialog(locator().navigatorKey.currentContext!); await _productDetailService.deleteItemFromWishlist(itemID, context); - GifLoaderDialogUtils.hideDialog(locator().navigatorKey.currentContext); + GifLoaderDialogUtils.hideDialog(locator().navigatorKey.currentContext!); if (_productDetailService.hasError) { - error = _productDetailService.error; + error = _productDetailService.error!; setState(ViewState.ErrorLocal); } else setState(ViewState.Idle); @@ -149,7 +149,7 @@ class ProductDetailViewModel extends BaseViewModel { setState(ViewState.Busy); await _productDetailService.productSpecificationData(itemID); if (_productDetailService.hasError) { - error = _productDetailService.error; + error = _productDetailService.error!; setState(ViewState.ErrorLocal); } else setState(ViewState.Idle); diff --git a/lib/core/viewModels/pharmacyModule/review_view_model.dart b/lib/core/viewModels/pharmacyModule/review_view_model.dart index 3661820b..00fd73fe 100644 --- a/lib/core/viewModels/pharmacyModule/review_view_model.dart +++ b/lib/core/viewModels/pharmacyModule/review_view_model.dart @@ -18,7 +18,7 @@ class ReviewViewModel extends BaseViewModel{ setState(ViewState.Busy); await _reviewService.getReview(); if (_reviewService.hasError) { - error = _reviewService.error; + error = _reviewService.error!; setState(ViewState.ErrorLocal); } else setState(ViewState.Idle); diff --git a/lib/core/viewModels/pharmacyModule/tems-condition-viewmodel.dart b/lib/core/viewModels/pharmacyModule/tems-condition-viewmodel.dart index a91b2c54..f8684092 100644 --- a/lib/core/viewModels/pharmacyModule/tems-condition-viewmodel.dart +++ b/lib/core/viewModels/pharmacyModule/tems-condition-viewmodel.dart @@ -10,13 +10,13 @@ import '../base_view_model.dart'; class TermsConditionViewModel extends BaseViewModel { TermsConditionService _termsConditionService = locator(); - ListUserAgreement get listUserAgreement => _termsConditionService.listUserAgreement; + ListUserAgreement get listUserAgreement => _termsConditionService.listUserAgreement!; Future getUserTermsAndConditionsForEPharmcy() async { setState(ViewState.Busy); await _termsConditionService.getUserTermsAndConditionsForEPharmcy(); if (_termsConditionService.hasError) { - error = _termsConditionService.error; + error = _termsConditionService.error!; setState(ViewState.Error); } else { setState(ViewState.Idle); diff --git a/lib/core/viewModels/pharmacyModule/wishlist_view_model.dart b/lib/core/viewModels/pharmacyModule/wishlist_view_model.dart index 9a619357..4f26ad79 100644 --- a/lib/core/viewModels/pharmacyModule/wishlist_view_model.dart +++ b/lib/core/viewModels/pharmacyModule/wishlist_view_model.dart @@ -17,7 +17,7 @@ class WishListViewModel extends BaseViewModel{ setState(isLocalLoader ? ViewState.BusyLocal:ViewState.Busy); await _wishlistService.getWishlist(); if (_wishlistService.hasError) { - error = _wishlistService.error; + error = _wishlistService.error!; setState(ViewState.ErrorLocal); } else setState(ViewState.Idle); diff --git a/lib/core/viewModels/pharmacy_categorise_view_model.dart b/lib/core/viewModels/pharmacy_categorise_view_model.dart index ef2e5a65..bd3f4f93 100644 --- a/lib/core/viewModels/pharmacy_categorise_view_model.dart +++ b/lib/core/viewModels/pharmacy_categorise_view_model.dart @@ -53,31 +53,31 @@ class PharmacyCategoriseViewModel extends BaseViewModel { setState(ViewState.Busy); await _pharmacyCategoriseService.getCategorise(); if (_pharmacyCategoriseService.hasError) { - error = _pharmacyCategoriseService.error; + error = _pharmacyCategoriseService.error!; setState(ViewState.ErrorLocal); } else setState(ViewState.Idle); } - Future getBrands({String id}) async { + Future getBrands({String? id}) async { hasError = false; // _insuranceCardService.clearInsuranceCard(); setState(ViewState.Busy); - await _pharmacyCategoriseService.getBrands(id: id); + await _pharmacyCategoriseService.getBrands(id: id!); if (_pharmacyCategoriseService.hasError) { - error = _pharmacyCategoriseService.error; + error = _pharmacyCategoriseService.error!; setState(ViewState.ErrorLocal); } else setState(ViewState.Idle); } - Future scanQr({String id}) async { + Future scanQr({String? id}) async { hasError = false; // _insuranceCardService.clearInsuranceCard(); setState(ViewState.Busy); - await _pharmacyCategoriseService.scanQr(id: id); + await _pharmacyCategoriseService.scanQr(id: id!); if (_pharmacyCategoriseService.hasError) { - error = _pharmacyCategoriseService.error; + error = _pharmacyCategoriseService.error!; setState(ViewState.ErrorLocal); } else setState(ViewState.Idle); @@ -87,27 +87,27 @@ class PharmacyCategoriseViewModel extends BaseViewModel { _pharmacyCategoriseService.clearSearchList(); } - Future searchProducts({String productName}) async { + Future searchProducts({String? productName}) async { hasError = false; _pharmacyCategoriseService.clearSearchList(); setState(ViewState.Busy); - await _pharmacyCategoriseService.searchProducts(productName: productName); + await _pharmacyCategoriseService.searchProducts(productName: productName!); if (_pharmacyCategoriseService.hasError) { - error = _pharmacyCategoriseService.error; + error = _pharmacyCategoriseService.error!; setState(ViewState.ErrorLocal); } else setState(ViewState.Idle); } Future getCategoriseParent( - {String i, int pageIndex, bool isLoading, BuildContext context}) async { + {String? i, int? pageIndex, bool? isLoading, BuildContext? context}) async { hasError = false; // _insuranceCardService.clearInsuranceCard(); setState(ViewState.Busy); // GifLoaderDialogUtils.showMyDialog(context); - await _pharmacyCategoriseService.getCategoriseParent(id: i); + await _pharmacyCategoriseService.getCategoriseParent(id: i!); if (_pharmacyCategoriseService.hasError) { - error = _pharmacyCategoriseService.error; + error = _pharmacyCategoriseService.error!; setState(ViewState.ErrorLocal); } else await getBrands(id: i); @@ -117,15 +117,15 @@ class PharmacyCategoriseViewModel extends BaseViewModel { } Future getParentProducts( - {String i, int pageIndex, bool isLoading, BuildContext context}) async { + {String? i, int? pageIndex, bool? isLoading, BuildContext? context}) async { hasError = false; // _insuranceCardService.clearInsuranceCard(); setState(ViewState.BusyLocal); - GifLoaderDialogUtils.showMyDialog(context); + GifLoaderDialogUtils.showMyDialog(context!); await _pharmacyCategoriseService.getParentProducts( - id: i, pageNumber: pageIndex, isLoading: isLoading); + id: i, pageNumber: pageIndex, isLoading: isLoading!); if (_pharmacyCategoriseService.hasError) { - error = _pharmacyCategoriseService.error; + error = _pharmacyCategoriseService.error!; setState(ViewState.ErrorLocal); } else setState(ViewState.Idle); @@ -133,18 +133,18 @@ class PharmacyCategoriseViewModel extends BaseViewModel { } Future getSubCategorise( - {String i, - int pageIndex, + {String? i, + int? pageIndex, bool isLoading = false, - BuildContext context}) async { + BuildContext? context}) async { hasError = false; // _insuranceCardService.clearInsuranceCard(); setState(ViewState.Busy); await _pharmacyCategoriseService.getSubCategorise( - id: i, + id: i!, ); if (_pharmacyCategoriseService.hasError) { - error = _pharmacyCategoriseService.error; + error = _pharmacyCategoriseService.error!; setState(ViewState.ErrorLocal); } else getSubProducts( @@ -152,59 +152,59 @@ class PharmacyCategoriseViewModel extends BaseViewModel { } Future getSubProducts( - {String i, - int pageIndex, + {String? i, + int? pageIndex, bool isLoading = false, - BuildContext context}) async { + BuildContext? context}) async { hasError = false; // _insuranceCardService.clearInsuranceCard(); setState(ViewState.BusyLocal); - GifLoaderDialogUtils.showMyDialog(context); + GifLoaderDialogUtils.showMyDialog(context!); await _pharmacyCategoriseService.getSubProducts( id: i, pageIndex: pageIndex, isLoading: isLoading); if (_pharmacyCategoriseService.hasError) { - error = _pharmacyCategoriseService.error; + error = _pharmacyCategoriseService.error!; setState(ViewState.ErrorLocal); } else setState(ViewState.Idle); - GifLoaderDialogUtils.hideDialog(context); + GifLoaderDialogUtils.hideDialog(context!); } - Future getFinalProducts({String i}) async { + Future getFinalProducts({String? i}) async { hasError = false; // _insuranceCardService.clearInsuranceCard(); setState(ViewState.Busy); - await _pharmacyCategoriseService.getFinalProducts(id: i); + await _pharmacyCategoriseService.getFinalProducts(id: i!); if (_pharmacyCategoriseService.hasError) { - error = _pharmacyCategoriseService.error; + error = _pharmacyCategoriseService.error!; setState(ViewState.ErrorLocal); } else setState(ViewState.Idle); } Future getFilteredProducts( - {String categoryId, String brandId, String min, String max}) async { + {String? categoryId, String? brandId, String? min, String? max}) async { hasError = false; // _insuranceCardService.clearInsuranceCard(); setState(ViewState.Busy); await _pharmacyCategoriseService.getFilteredProducts( categoryId: categoryId, brandId: brandId, max: max, min: min); if (_pharmacyCategoriseService.hasError) { - error = _pharmacyCategoriseService.error; + error = _pharmacyCategoriseService.error!; setState(ViewState.ErrorLocal); } else setState(ViewState.Idle); } Future getFilteredSubProducts( - {String categoryId, String brandId, String min, String max}) async { + {String? categoryId, String? brandId, String? min, String? max}) async { hasError = false; // _insuranceCardService.clearInsuranceCard(); setState(ViewState.Busy); await _pharmacyCategoriseService.getFilteredSubProducts( categoryId: categoryId, brandId: brandId, max: max, min: min); if (_pharmacyCategoriseService.hasError) { - error = _pharmacyCategoriseService.error; + error = _pharmacyCategoriseService.error!; setState(ViewState.ErrorLocal); } else setState(ViewState.Idle); @@ -214,7 +214,7 @@ class PharmacyCategoriseViewModel extends BaseViewModel { setState(ViewState.Busy); await _pharmacyCategoriseService.getManufacturerProducts(id); if (_pharmacyCategoriseService.hasError) { - error = _pharmacyCategoriseService.error; + error = _pharmacyCategoriseService.error!; setState(ViewState.Error); } else { setState(ViewState.Idle); @@ -225,7 +225,7 @@ class PharmacyCategoriseViewModel extends BaseViewModel { setState(ViewState.Busy); await _pharmacyCategoriseService.getLastVisitedProducts(); if (_pharmacyCategoriseService.hasError) { - error = _pharmacyCategoriseService.error; + error = _pharmacyCategoriseService.error!; setState(ViewState.Error); } else { setState(ViewState.Idle); @@ -236,7 +236,7 @@ class PharmacyCategoriseViewModel extends BaseViewModel { setState(ViewState.Busy); await _pharmacyCategoriseService.getBestSellerProducts(); if (_pharmacyCategoriseService.hasError) { - error = _pharmacyCategoriseService.error; + error = _pharmacyCategoriseService.error!; setState(ViewState.Error); } else { setState(ViewState.Idle); @@ -247,7 +247,7 @@ class PharmacyCategoriseViewModel extends BaseViewModel { setState(ViewState.Busy); await _pharmacyCategoriseService.getMostViewedProducts(); if (_pharmacyCategoriseService.hasError) { - error = _pharmacyCategoriseService.error; + error = _pharmacyCategoriseService.error!; setState(ViewState.Error); } else { setState(ViewState.Idle); @@ -258,7 +258,7 @@ class PharmacyCategoriseViewModel extends BaseViewModel { setState(ViewState.Busy); await _pharmacyCategoriseService.getNewProducts(); if (_pharmacyCategoriseService.hasError) { - error = _pharmacyCategoriseService.error; + error = _pharmacyCategoriseService.error!; setState(ViewState.Error); } else { setState(ViewState.Idle); diff --git a/lib/core/viewModels/product_categories_view_model.dart b/lib/core/viewModels/product_categories_view_model.dart index fa31accd..2508f557 100644 --- a/lib/core/viewModels/product_categories_view_model.dart +++ b/lib/core/viewModels/product_categories_view_model.dart @@ -19,7 +19,7 @@ class ProductCategoriesViewModel extends BaseViewModel { setState(ViewState.Busy); await _pharmacyCategoriseService.getCategorise(); if (_pharmacyCategoriseService.hasError) { - error = _pharmacyCategoriseService.error; + error = _pharmacyCategoriseService.error!; setState(ViewState.ErrorLocal); } else setState(ViewState.Idle); diff --git a/lib/core/viewModels/project_view_model.dart b/lib/core/viewModels/project_view_model.dart index 3c920199..0feaaaeb 100644 --- a/lib/core/viewModels/project_view_model.dart +++ b/lib/core/viewModels/project_view_model.dart @@ -35,18 +35,18 @@ class ProjectViewModel extends BaseViewModel { String error = ''; dynamic searchvalue; bool isLogin = false; - int laserSelectionDuration; + int? laserSelectionDuration; - double _latitude; - double _longitude; + double? _latitude; + double? _longitude; - RegisterInfoResponse _registerInfo = RegisterInfoResponse(); + RegisterInfoResponse? _registerInfo = RegisterInfoResponse(); - double get latitude => _latitude; + double get latitude => _latitude!; - double get longitude => _longitude; + double get longitude => _longitude!; - RegisterInfoResponse get registerInfo => _registerInfo; + RegisterInfoResponse get registerInfo => _registerInfo!; dynamic get searchValue => searchvalue; @@ -67,7 +67,7 @@ class ProjectViewModel extends BaseViewModel { List selectedBodyPartList = []; - StreamSubscription subscription; + StreamSubscription? subscription; ProjectViewModel() { loadSharedPrefLanguage(); @@ -116,9 +116,9 @@ class ProjectViewModel extends BaseViewModel { notifyListeners(); } - setPrivilegeModelList({List privilege}) { + setPrivilegeModelList({List? privilege}) { this.isLoginChild = isLoginChild; - privilegeRootUser = privilege; + privilegeRootUser = privilege!; AppGlobal.isNetworkDebugEnabled = havePrivilege(93); @@ -146,7 +146,7 @@ class ProjectViewModel extends BaseViewModel { notifyListeners(); } - setIsLoginChild({@required bool isLoginChild}) { + setIsLoginChild({required bool isLoginChild}) { this.isLoginChild = isLoginChild; notifyListeners(); } @@ -155,11 +155,11 @@ class ProjectViewModel extends BaseViewModel { bool isHavePrivilege = false; if (isLoginChild) privilegeChildUser.forEach((element) { - if (element.iD == id) isHavePrivilege = element.privilege; + if (element.iD == id) isHavePrivilege = element.privilege!; }); else { privilegeRootUser.forEach((element) { - if (element.iD == id) isHavePrivilege = element.privilege; + if (element.iD == id) isHavePrivilege = element.privilege!; }); } return isHavePrivilege; @@ -167,7 +167,7 @@ class ProjectViewModel extends BaseViewModel { @override void dispose() { - if (subscription != null) subscription.cancel(); + if (subscription != null) subscription!.cancel(); super.dispose(); } diff --git a/lib/core/viewModels/qr_view_model.dart b/lib/core/viewModels/qr_view_model.dart index 3c14e195..c62634ab 100644 --- a/lib/core/viewModels/qr_view_model.dart +++ b/lib/core/viewModels/qr_view_model.dart @@ -17,7 +17,7 @@ import '../../locator.dart'; class QrViewModel extends BaseViewModel { QrService _qrService = locator(); bool isSavePark = false; - QRParkingModel qrParkingModel; + QRParkingModel? qrParkingModel; readQr() async { //TODO fix the barcode scan @@ -27,7 +27,7 @@ class QrViewModel extends BaseViewModel { setState(ViewState.BusyLocal); await _qrService.getQRParkingByID(qRParkingID); if (_qrService.hasError) { - error = _qrService.error; + error = _qrService.error!; setState(ViewState.ErrorLocal); } else { if (_qrService.qRParkingList.length > 0) { @@ -44,14 +44,14 @@ class QrViewModel extends BaseViewModel { readQR() async { if (await PermissionService.isCameraEnabled()) { - return (await BarcodeScanner.scan())?.rawContent; + return (await BarcodeScanner.scan()).rawContent; } else { if (Platform.isAndroid) { Utils.showPermissionConsentDialog(AppGlobal.context, TranslationBase.of(AppGlobal.context).cameraPermissionDialog, () async { - return (await BarcodeScanner.scan())?.rawContent; + return (await BarcodeScanner.scan()).rawContent; }); } else { - return (await BarcodeScanner.scan())?.rawContent; + return (await BarcodeScanner.scan()).rawContent; } } } diff --git a/lib/core/viewModels/vaccine_view_model.dart b/lib/core/viewModels/vaccine_view_model.dart index 895b73a5..e5ab9b7e 100644 --- a/lib/core/viewModels/vaccine_view_model.dart +++ b/lib/core/viewModels/vaccine_view_model.dart @@ -21,7 +21,7 @@ class VaccineViewModel extends BaseViewModel { setState(ViewState.Busy); await _vaccineService.getMyVaccine(); if (_vaccineService.hasError) { - error = _vaccineService.error; + error = _vaccineService.error!; setState(ViewState.Error); } else setState(ViewState.Idle); @@ -32,33 +32,33 @@ class VaccineViewModel extends BaseViewModel { setState(ViewState.Busy); await _vaccineService.getMyVaccinationItem(); if (_vaccineService.hasError) { - error = _vaccineService.error; + error = _vaccineService.error!; setState(ViewState.Error); } else setState(ViewState.Idle); } - Future getMyVaccinationOnHand({String pItemCode}) async { + Future getMyVaccinationOnHand({String? pItemCode}) async { hasError = false; setState(ViewState.Busy); - await _vaccineService.getMyVaccinationOnHand(pItemCode: pItemCode); + await _vaccineService.getMyVaccinationOnHand(pItemCode: pItemCode!); if (_vaccineService.hasError) { - error = _vaccineService.error; + error = _vaccineService.error!; setState(ViewState.ErrorLocal); } else setState(ViewState.Idle); } - Future sendEmail({String message}) async { + Future sendEmail({String? message}) async { hasError = false; setState(ViewState.BusyLocal); await _vaccineService.sendEmail(); if (_vaccineService.hasError) { - error = _vaccineService.error; + error = _vaccineService.error!; setState(ViewState.ErrorLocal); AppToast.showErrorToast(message: error); } else { - AppToast.showSuccessToast(message: message); + AppToast.showSuccessToast(message: message!); setState(ViewState.Idle); } } diff --git a/lib/core/viewModels/weather/weather_view_model.dart b/lib/core/viewModels/weather/weather_view_model.dart index f95bf0fd..733c591d 100644 --- a/lib/core/viewModels/weather/weather_view_model.dart +++ b/lib/core/viewModels/weather/weather_view_model.dart @@ -19,7 +19,7 @@ class WeatherViewModel extends BaseViewModel { await _weatherService.getWeatherData(); // } if (_weatherService.hasError) { - error = _weatherService.error; + error = _weatherService.error!; setState(ViewState.Error); } else setState(ViewState.Idle); diff --git a/lib/extensions/list_extension.dart b/lib/extensions/list_extension.dart index ef56ff07..eeb3d6f3 100644 --- a/lib/extensions/list_extension.dart +++ b/lib/extensions/list_extension.dart @@ -1,5 +1,5 @@ extension Unique on List { - List unique([Id Function(E element) id, bool inplace = true]) { + List unique([Id Function(E element)? id, bool inplace = true]) { final ids = Set(); var list = inplace ? this : List.from(this); list.retainWhere((x) => ids.add(id != null ? id(x) : x as Id)); diff --git a/lib/generated/json/OfferCategoriesResponseModel_helper.dart b/lib/generated/json/OfferCategoriesResponseModel_helper.dart index 1a28d179..b6bb7d97 100644 --- a/lib/generated/json/OfferCategoriesResponseModel_helper.dart +++ b/lib/generated/json/OfferCategoriesResponseModel_helper.dart @@ -11,9 +11,9 @@ offerCategoriesResponseModelFromJson(PackagesCategoriesResponseModel data, Map(); + data.localizedNames = []; (json['localized_names'] as List).forEach((v) { - data.localizedNames.add(new OfferCategoriesResponseModelLocalizedName().fromJson(v)); + data.localizedNames!.add(new OfferCategoriesResponseModelLocalizedName().fromJson(v)); }); } if (json['description'] != null) { @@ -68,16 +68,16 @@ offerCategoriesResponseModelFromJson(PackagesCategoriesResponseModel data, Map(); - data.roleIds.addAll(json['role_ids']); + data.roleIds =[]; + data.roleIds!.addAll(json['role_ids']); } if (json['discount_ids'] != null) { - data.discountIds = new List(); - data.discountIds.addAll(json['discount_ids']); + data.discountIds = []; + data.discountIds!.addAll(json['discount_ids']); } if (json['store_ids'] != null) { - data.storeIds = new List(); - data.storeIds.addAll(json['store_ids']); + data.storeIds =[]; + data.storeIds!.addAll(json['store_ids']); } if (json['image'] != null) { data.image = new OfferCategoriesResponseModelImage().fromJson(json['image']); @@ -97,7 +97,7 @@ Map offerCategoriesResponseModelToJson(PackagesCategoriesRespon data['name'] = entity.name; data['namen'] = entity.namen; if (entity.localizedNames != null) { - data['localized_names'] = entity.localizedNames.map((v) => v.toJson()).toList(); + data['localized_names'] = entity.localizedNames!.map((v) => v.toJson()).toList(); } data['description'] = entity.description; data['category_template_id'] = entity.categoryTemplateId; @@ -126,7 +126,7 @@ Map offerCategoriesResponseModelToJson(PackagesCategoriesRespon data['store_ids'] = []; } if (entity.image != null) { - data['image'] = entity.image.toJson(); + data['image'] = entity.image!.toJson(); } data['se_name'] = entity.seName; data['is_leaf'] = entity.isLeaf; diff --git a/lib/generated/json/OfferProductsResponseModel_helper.dart b/lib/generated/json/OfferProductsResponseModel_helper.dart index ca402fc0..818de36a 100644 --- a/lib/generated/json/OfferProductsResponseModel_helper.dart +++ b/lib/generated/json/OfferProductsResponseModel_helper.dart @@ -14,9 +14,9 @@ offerProductsResponseModelFromJson(PackagesResponseModel data, Map(); + data.localizedNames = []; (json['localized_names'] as List).forEach((v) { - data.localizedNames.add(new OfferProductsResponseModelLocalizedName().fromJson(v)); + data.localizedNames!.add(new OfferProductsResponseModelLocalizedName().fromJson(v)); }); } if (json['short_description'] != null) { @@ -302,53 +302,53 @@ offerProductsResponseModelFromJson(PackagesResponseModel data, Map(); - data.roleIds.addAll(json['role_ids']); + data.roleIds =[]; + data.roleIds!.addAll(json['role_ids']); } if (json['discount_ids'] != null) { - data.discountIds = new List(); - data.discountIds.addAll(json['discount_ids']); + data.discountIds = []; + data.discountIds!.addAll(json['discount_ids']); } if (json['store_ids'] != null) { - data.storeIds = new List(); - data.storeIds.addAll(json['store_ids']); + data.storeIds = []; + data.storeIds!.addAll(json['store_ids']); } if (json['store_names'] != null) { - data.storeNames = new List(); - data.storeNames.addAll(json['store_names']); + data.storeNames = []; + data.storeNames!.addAll(json['store_names']); } if (json['manufacturer_ids'] != null) { data.manufacturerIds = json['manufacturer_ids']?.map((v) => v?.toInt())?.toList()?.cast(); } if (json['reviews'] != null) { - data.reviews = new List(); - data.reviews.addAll(json['reviews']); + data.reviews =[]; + data.reviews!.addAll(json['reviews']); } if (json['images'] != null) { - data.images = new List(); + data.images = []; (json['images'] as List).forEach((v) { - data.images.add(new OfferProductsResponseModelImage().fromJson(v)); + data.images!.add(new OfferProductsResponseModelImage().fromJson(v)); }); } if (json['attributes'] != null) { - data.attributes = new List(); - data.attributes.addAll(json['attributes']); + data.attributes = []; + data.attributes!.addAll(json['attributes']); } if (json['specifications'] != null) { - data.specifications = new List(); + data.specifications = []; (json['specifications'] as List).forEach((v) { - data.specifications.add(new OfferProductsResponseModelSpecification().fromJson(v)); + data.specifications!.add(new OfferProductsResponseModelSpecification().fromJson(v)); }); } if (json['associated_product_ids'] != null) { - data.associatedProductIds = new List(); - data.associatedProductIds.addAll(json['associated_product_ids']); + data.associatedProductIds = []; + data.associatedProductIds!.addAll(json['associated_product_ids']); } if (json['tags'] != null) { - data.tags = new List(); - data.tags.addAll(json['tags']); + data.tags = []; + data.tags!.addAll(json['tags']); } if (json['vendor_id'] != null) { data.vendorId = json['vendor_id']?.toInt(); @@ -366,7 +366,7 @@ Map offerProductsResponseModelToJson(PackagesResponseModel enti data['name'] = entity.name; data['namen'] = entity.namen; if (entity.localizedNames != null) { - data['localized_names'] = entity.localizedNames.map((v) => v.toJson()).toList(); + data['localized_names'] = entity.localizedNames!.map((v) => v.toJson()).toList(); } data['short_description'] = entity.shortDescription; data['short_descriptionn'] = entity.shortDescriptionn; @@ -476,13 +476,13 @@ Map offerProductsResponseModelToJson(PackagesResponseModel enti data['reviews'] = []; } if (entity.images != null) { - data['images'] = entity.images.map((v) => v.toJson()).toList(); + data['images'] = entity.images!.map((v) => v.toJson()).toList(); } if (entity.attributes != null) { data['attributes'] = []; } if (entity.specifications != null) { - data['specifications'] = entity.specifications.map((v) => v.toJson()).toList(); + data['specifications'] = entity.specifications!.map((v) => v.toJson()).toList(); } if (entity.associatedProductIds != null) { data['associated_product_ids'] = []; diff --git a/lib/generated/json/base/json_convert_content.dart b/lib/generated/json/base/json_convert_content.dart index 1c785ef1..c4d393c3 100644 --- a/lib/generated/json/base/json_convert_content.dart +++ b/lib/generated/json/base/json_convert_content.dart @@ -4,6 +4,7 @@ import 'package:diplomaticquarterapp/core/model/geofencing/responses/GeoZonesResponseModel.dart'; import 'package:diplomaticquarterapp/core/model/geofencing/responses/LogGeoZoneResponseModel.dart'; + // This file is automatically generated. DO NOT EDIT, all your changes would be lost. import 'package:diplomaticquarterapp/core/model/packages_offers/responses/PackagesCategoriesResponseModel.dart'; import 'package:diplomaticquarterapp/core/model/packages_offers/responses/PackagesResponseModel.dart'; @@ -96,31 +97,56 @@ class JsonConvert { //list is returned by type static M _getListChildType(List data) { - if (List() is M) { - return data.map((e) => PackagesCategoriesResponseModel().fromJson(e)).toList() as M; - } else if (List() is M) { - return data.map((e) => OfferCategoriesResponseModelLocalizedName().fromJson(e)).toList() as M; - } else if (List() is M) { - return data.map((e) => OfferCategoriesResponseModelImage().fromJson(e)).toList() as M; - } else if (List() is M) { - return data.map((e) => LogGeoZoneResponseModel().fromJson(e)).toList() as M; - } else if (List() is M) { - return data.map((e) => PackagesResponseModel().fromJson(e)).toList() as M; - } else if (List() is M) { - return data.map((e) => OfferProductsResponseModelLocalizedName().fromJson(e)).toList() as M; - } else if (List() is M) { - return data.map((e) => OfferProductsResponseModelImage().fromJson(e)).toList() as M; - } else if (List() is M) { - return data.map((e) => OfferProductsResponseModelSpecification().fromJson(e)).toList() as M; - } else if (List() is M) { - return data.map((e) => GeoZonesResponseModel().fromJson(e)).toList() as M; + //Changed By Aamir + if ([] is M) { + return data.map((e) => PackagesCategoriesResponseModel().fromJson(e as Map)).toList() as M; + } else if ([] is M) { + return data.map((e) => OfferCategoriesResponseModelLocalizedName().fromJson(e as Map)).toList() as M; + } else if ([] is M) { + return data.map((e) => OfferCategoriesResponseModelImage().fromJson(e as Map)).toList() as M; + } else if ([] is M) { + return data.map((e) => LogGeoZoneResponseModel().fromJson(e as Map)).toList() as M; + } else if ([] is M) { + return data.map((e) => PackagesResponseModel().fromJson(e as Map)).toList() as M; + } else if ([] is M) { + return data.map((e) => OfferProductsResponseModelLocalizedName().fromJson(e as Map)).toList() as M; + } else if ([] is M) { + return data.map((e) => OfferProductsResponseModelImage().fromJson(e as Map)).toList() as M; + } else if ([] is M) { + return data.map((e) => OfferProductsResponseModelSpecification().fromJson(e as Map)).toList() as M; + } else if ([] is M) { + return data.map((e) => GeoZonesResponseModel().fromJson(e as Map)).toList() as M; } - return null; + return M as M; } + // static M _getListChildType(List data) { + // if (List() is M) { + // return data.map((e) => PackagesCategoriesResponseModel().fromJson(e)).toList() as M; + // } else if (List() is M) { + // return data.map((e) => OfferCategoriesResponseModelLocalizedName().fromJson(e)).toList() as M; + // } else if (List() is M) { + // return data.map((e) => OfferCategoriesResponseModelImage().fromJson(e)).toList() as M; + // } else if (List() is M) { + // return data.map((e) => LogGeoZoneResponseModel().fromJson(e)).toList() as M; + // } else if (List() is M) { + // return data.map((e) => PackagesResponseModel().fromJson(e)).toList() as M; + // } else if (List() is M) { + // return data.map((e) => OfferProductsResponseModelLocalizedName().fromJson(e)).toList() as M; + // } else if (List() is M) { + // return data.map((e) => OfferProductsResponseModelImage().fromJson(e)).toList() as M; + // } else if (List() is M) { + // return data.map((e) => OfferProductsResponseModelSpecification().fromJson(e)).toList() as M; + // } else if (List() is M) { + // return data.map((e) => GeoZonesResponseModel().fromJson(e)).toList() as M; + // } + // return null; + // } + static M fromJsonAsT(json) { if (json is List) { - return _getListChildType(json); + return _getListChildType(json as List>); + //changed by Aamir added after As keyword } else { return _fromJsonSingle(json) as M; } diff --git a/lib/models/Appointments/AppoimentAllHistoryResultList.dart b/lib/models/Appointments/AppoimentAllHistoryResultList.dart index 9f68e16b..fd8bd3b7 100644 --- a/lib/models/Appointments/AppoimentAllHistoryResultList.dart +++ b/lib/models/Appointments/AppoimentAllHistoryResultList.dart @@ -1,25 +1,25 @@ class AppoitmentAllHistoryResultList { - String setupID; - int projectID; - int appointmentNo; - String appointmentDate; + String? setupID; + int? projectID; + int? appointmentNo; + String? appointmentDate; dynamic appointmentDateN; - int appointmentType; - String bookDate; - int patientType; - int patientID; - int clinicID; - int doctorID; - String endDate; - String startTime; - String endTime; - int status; - int visitType; - int visitFor; - int patientStatusType; - int companyID; - int bookedBy; - String bookedOn; + int? appointmentType; + String? bookDate; + int? patientType; + int? patientID; + int? clinicID; + int? doctorID; + String? endDate; + String? startTime; + String? endTime; + int? status; + int? visitType; + int? visitFor; + int? patientStatusType; + int? companyID; + int? bookedBy; + String? bookedOn; dynamic confirmedBy; dynamic confirmedOn; dynamic arrivalChangedBy; @@ -28,45 +28,45 @@ class AppoitmentAllHistoryResultList { dynamic editedOn; dynamic doctorName; dynamic doctorNameN; - String statusDesc; + String? statusDesc; dynamic statusDescN; - bool vitalStatus; + bool? vitalStatus; dynamic vitalSignAppointmentNo; - int episodeID; - int actualDoctorRate; - String clinicName; - bool complainExists; - String doctorImageURL; - String doctorNameObj; - int doctorRate; + int? episodeID; + int? actualDoctorRate; + String? clinicName; + bool? complainExists; + String? doctorImageURL; + String? doctorNameObj; + int? doctorRate; dynamic decimalDoctorRate; - List doctorSpeciality; - String doctorTitle; - int gender; - String genderDescription; - bool iSAllowOnlineCheckedIN; - bool isActiveDoctor; - bool isActiveDoctorProfile; - bool isDoctorAllowVedioCall; - bool isExecludeDoctor; - int isFollowup; - bool isLiveCareAppointment; - bool isInOutPatient; - bool isMedicalReportRequested; - bool isOnlineCheckedIN; - String latitude; + List? doctorSpeciality; + String? doctorTitle; + int? gender; + String? genderDescription; + bool? iSAllowOnlineCheckedIN; + bool? isActiveDoctor; + bool? isActiveDoctorProfile; + bool? isDoctorAllowVedioCall; + bool? isExecludeDoctor; + int? isFollowup; + bool? isLiveCareAppointment; + bool? isInOutPatient; + bool? isMedicalReportRequested; + bool? isOnlineCheckedIN; + String? latitude; dynamic listHISGetContactLensPerscription; dynamic listHISGetGlassPerscription; - String longitude; - int nextAction; - int noOfPatientsRate; - int originalClinicID; - int originalProjectID; - String projectName; - String qR; - int remaniningHoursTocanPay; - bool sMSButtonVisable; - int serviceID; + String? longitude; + int? nextAction; + int? noOfPatientsRate; + int? originalClinicID; + int? originalProjectID; + String? projectName; + String? qR; + int? remaniningHoursTocanPay; + bool? sMSButtonVisable; + int? serviceID; AppoitmentAllHistoryResultList( {this.setupID, @@ -287,12 +287,12 @@ class AppoitmentAllHistoryResultList { } class PatientAppointmentList { - String filterName = ""; - List patientDoctorAppointmentList =[]; + String? filterName = ""; + List? patientDoctorAppointmentList =[]; PatientAppointmentList( {this.filterName, - AppoitmentAllHistoryResultList patientDoctorAppointment}) { - patientDoctorAppointmentList.add(patientDoctorAppointment); + AppoitmentAllHistoryResultList? patientDoctorAppointment}) { + patientDoctorAppointmentList!.add(patientDoctorAppointment!); } } diff --git a/lib/models/Appointments/DentalChiefComplaintsModel.dart b/lib/models/Appointments/DentalChiefComplaintsModel.dart index c15b828a..8314723d 100644 --- a/lib/models/Appointments/DentalChiefComplaintsModel.dart +++ b/lib/models/Appointments/DentalChiefComplaintsModel.dart @@ -1,13 +1,13 @@ class DentalChiefComplaintsModel { - List listDentalChiefComplain; + List? listDentalChiefComplain; DentalChiefComplaintsModel({this.listDentalChiefComplain}); DentalChiefComplaintsModel.fromJson(Map json) { if (json['List_DentalChiefComplain'] != null) { - listDentalChiefComplain = new List(); + listDentalChiefComplain = []; json['List_DentalChiefComplain'].forEach((v) { - listDentalChiefComplain.add(new ListDentalChiefComplain.fromJson(v)); + listDentalChiefComplain!.add(new ListDentalChiefComplain.fromJson(v)); }); } } @@ -16,17 +16,17 @@ class DentalChiefComplaintsModel { final Map data = new Map(); if (this.listDentalChiefComplain != null) { data['List_DentalChiefComplain'] = - this.listDentalChiefComplain.map((v) => v.toJson()).toList(); + this.listDentalChiefComplain!.map((v) => v.toJson()).toList(); } return data; } } class ListDentalChiefComplain { - int projectID; - int iD; - String name; - String nameN; + int? projectID; + int? iD; + String? name; + String? nameN; ListDentalChiefComplain({this.projectID, this.iD, this.name, this.nameN}); diff --git a/lib/models/Appointments/DentalProceduresModel.dart b/lib/models/Appointments/DentalProceduresModel.dart index a66be8d1..ca8e5eba 100644 --- a/lib/models/Appointments/DentalProceduresModel.dart +++ b/lib/models/Appointments/DentalProceduresModel.dart @@ -1,14 +1,14 @@ class DentalProceduresModel { - List listIsPatientHasOnGoingEstimation; + List? listIsPatientHasOnGoingEstimation; DentalProceduresModel({this.listIsPatientHasOnGoingEstimation}); DentalProceduresModel.fromJson(Map json) { if (json['List_IsPatientHasOnGoingEstimation'] != null) { listIsPatientHasOnGoingEstimation = - new List(); + []; json['List_IsPatientHasOnGoingEstimation'].forEach((v) { - listIsPatientHasOnGoingEstimation + listIsPatientHasOnGoingEstimation! .add(new ListIsPatientHasOnGoingEstimation.fromJson(v)); }); } @@ -18,7 +18,7 @@ class DentalProceduresModel { final Map data = new Map(); if (this.listIsPatientHasOnGoingEstimation != null) { data['List_IsPatientHasOnGoingEstimation'] = this - .listIsPatientHasOnGoingEstimation + .listIsPatientHasOnGoingEstimation! .map((v) => v.toJson()) .toList(); } @@ -29,12 +29,12 @@ class DentalProceduresModel { class ListIsPatientHasOnGoingEstimation { dynamic setupID; dynamic estimationNo; - int projectID; - String procedureId; - int patientID; - int sequenceNo; - int neededTime; - String procedureName; + int? projectID; + String? procedureId; + int? patientID; + int? sequenceNo; + int? neededTime; + String? procedureName; dynamic procedureNameN; ListIsPatientHasOnGoingEstimation( diff --git a/lib/models/Appointments/DoctorListResponse.dart b/lib/models/Appointments/DoctorListResponse.dart index 5922f5b7..b3aa68be 100644 --- a/lib/models/Appointments/DoctorListResponse.dart +++ b/lib/models/Appointments/DoctorListResponse.dart @@ -1,46 +1,46 @@ class DoctorList { - num clinicID; + num? clinicID; dynamic appointmentNo; - String clinicName; - String doctorTitle; - num iD; - String name; - num projectID; - String projectName; - num actualDoctorRate; - num clinicRoomNo; + String? clinicName; + String? doctorTitle; + num? iD; + String? name; + num? projectID; + String? projectName; + num? actualDoctorRate; + num? clinicRoomNo; dynamic date; dynamic appointmentDate; dynamic dayName; - num doctorID; - String doctorImageURL; + num? doctorID; + String? doctorImageURL; dynamic doctorProfile; dynamic doctorProfileInfo; - num doctorRate; - num gender; - String genderDescription; - bool isAppointmentAllowed; - bool isDoctorAllowVedioCall; - bool isDoctorDummy; - bool isLiveCare; - bool isLiveCareClinic; - bool isDoctorHasPrePostImages; - String latitude; - String longitude; - String nationalityFlagURL; - String nationalityID; - String nationalityName; + num? doctorRate; + num? gender; + String? genderDescription; + bool? isAppointmentAllowed; + bool? isDoctorAllowVedioCall; + bool? isDoctorDummy; + bool? isLiveCare; + bool? isLiveCareClinic; + bool? isDoctorHasPrePostImages; + String? latitude; + String? longitude; + String? nationalityFlagURL; + String? nationalityID; + String? nationalityName; dynamic nearestFreeSlot; - num noOfPatientsRate; - num originalClinicID; - num personRate; + num? noOfPatientsRate; + num? originalClinicID; + num? personRate; dynamic projectDistanceInKiloMeters; - String qR; + String? qR; dynamic qRString; - num rateNumber; + num? rateNumber; dynamic serviceID; - String setupID; - List speciality; + String? setupID; + List? speciality; dynamic workingHours; dynamic decimalDoctorRate; @@ -96,7 +96,7 @@ class DoctorList { clinicName = json['ClinicName']; doctorTitle = json['DoctorTitle']; iD = json['ID']; - name = json['DoctorName']??json['Name']; + name = json['DoctorName'] ?? json['Name']; projectID = json['ProjectID']; projectName = json['ProjectName']; actualDoctorRate = json['ActualDoctorRate']; @@ -132,8 +132,7 @@ class DoctorList { rateNumber = json['RateNumber']; serviceID = json['ServiceID']; setupID = json['SetupID']; - if (json.containsKey('Speciality') && json['Speciality']!=null) - speciality = json['Speciality'].cast(); + if (json.containsKey('Speciality') && json['Speciality'] != null) speciality = json['Speciality'].cast(); workingHours = json['WorkingHours']; decimalDoctorRate = json['DecimalDoctorRate']; } @@ -188,14 +187,11 @@ class DoctorList { } class PatientDoctorAppointmentList { - String filterName = ""; - String distanceInKMs = ""; - List patientDoctorAppointmentList =[]; + String? filterName = ""; + String? distanceInKMs = ""; + List? patientDoctorAppointmentList = []; - PatientDoctorAppointmentList( - {this.filterName, - this.distanceInKMs, - DoctorList patientDoctorAppointment}) { - patientDoctorAppointmentList.add(patientDoctorAppointment); + PatientDoctorAppointmentList({this.filterName, this.distanceInKMs, DoctorList? patientDoctorAppointment}) { + patientDoctorAppointmentList!.add(patientDoctorAppointment!); } } diff --git a/lib/models/Appointments/DoctorProfile.dart b/lib/models/Appointments/DoctorProfile.dart index 68b83800..19f287e8 100644 --- a/lib/models/Appointments/DoctorProfile.dart +++ b/lib/models/Appointments/DoctorProfile.dart @@ -1,47 +1,47 @@ class DoctorProfileList { - num doctorID; - String doctorName; + num? doctorID; + String? doctorName; dynamic doctorNameN; - num clinicID; - String clinicDescription; + num? clinicID; + String? clinicDescription; dynamic clinicDescriptionN; dynamic licenseExpiry; - num employmentType; + num? employmentType; dynamic setupID; - num projectID; - String projectName; - String nationalityID; - String nationalityName; + num? projectID; + String? projectName; + String? nationalityID; + String? nationalityName; dynamic nationalityNameN; - num gender; - String genderDescription; + num? gender; + String? genderDescription; dynamic genderDescriptionN; dynamic doctorTitle; dynamic projectNameN; - bool isAllowWaitList; - String titleDescription; + bool? isAllowWaitList; + String? titleDescription; dynamic titleDescriptionN; dynamic isRegistered; dynamic isDoctorDummy; - bool isActive; - bool isDoctorHasPrePostImages; + bool? isActive; + bool? isDoctorHasPrePostImages; dynamic isDoctorAppointmentDisplayed; - bool doctorClinicActive; + bool? doctorClinicActive; dynamic isbookingAllowed; - String doctorCases; + String? doctorCases; dynamic doctorPicture; - String doctorProfileInfo; - List specialty; - num actualDoctorRate; - String doctorImageURL; - num doctorRate; - num decimalDoctorRate; - String doctorTitleForProfile; - bool isAppointmentAllowed; - String nationalityFlagURL; - num noOfPatientsRate; - String qR; - num serviceID; + String? doctorProfileInfo; + List? specialty; + num? actualDoctorRate; + String? doctorImageURL; + num? doctorRate; + num? decimalDoctorRate; + String? doctorTitleForProfile; + bool? isAppointmentAllowed; + String? nationalityFlagURL; + num? noOfPatientsRate; + String? qR; + num? serviceID; DoctorProfileList( {this.doctorID, diff --git a/lib/models/Appointments/InsertAppointmentRequest.dart b/lib/models/Appointments/InsertAppointmentRequest.dart index 383e2eb5..719f6ff9 100644 --- a/lib/models/Appointments/InsertAppointmentRequest.dart +++ b/lib/models/Appointments/InsertAppointmentRequest.dart @@ -1,20 +1,20 @@ import 'package:diplomaticquarterapp/models/Request.dart'; class InsertAppointmentRequest extends Request { - String AppointmentDate; // ???? "/Date(1577750400000)/" - int DoctorID; - int InitialSlotDuration; - String SelectedTime; - String StartTime; - String EndTime; - String TempValue; - int VisitFor; - int VisitType; - bool IsVirtual; - List GeneralProcedureList; - String DeviceToken; - bool IsForLiveCare; - String OriginalClinicID; - String OriginalProjectID; + String? AppointmentDate; // ???? "/Date(1577750400000)/" + int? DoctorID; + int? InitialSlotDuration; + String? SelectedTime; + String? StartTime; + String? EndTime; + String? TempValue; + int? VisitFor; + int? VisitType; + bool? IsVirtual; + List? GeneralProcedureList; + String? DeviceToken; + bool? IsForLiveCare; + String? OriginalClinicID; + String? OriginalProjectID; } diff --git a/lib/models/Appointments/OBGyneProcedureListResponse.dart b/lib/models/Appointments/OBGyneProcedureListResponse.dart index ca45583a..6af282b5 100644 --- a/lib/models/Appointments/OBGyneProcedureListResponse.dart +++ b/lib/models/Appointments/OBGyneProcedureListResponse.dart @@ -1,35 +1,35 @@ class OBGyneProcedureListResponse { - String setupID; - int projectID; - int episodeID; - int appointmentNo; - int orderNo; - String procedureId; - int lineItemNo; - String orderDate; - int orderType; - int patientType; - int patientID; - int price; - int orderStatus; - bool isApprovalRequired; - bool isApprovalCreated; - bool isInvoiced; - bool isReferralInvoiced; - bool isEROrder; - bool isCash; - int uniqueRowID; - int status; - int clinicID; - int doctorID; - String procedureName; - String procedureNameN; - String clinicDescription; - String clinicDescriptionN; - String doctorName; - String doctorNameN; - String projectDescription; - String projectDescriptionN; + String? setupID; + int? projectID; + int? episodeID; + int? appointmentNo; + int? orderNo; + String? procedureId; + int? lineItemNo; + String? orderDate; + int? orderType; + int? patientType; + int? patientID; + int? price; + int? orderStatus; + bool? isApprovalRequired; + bool? isApprovalCreated; + bool? isInvoiced; + bool? isReferralInvoiced; + bool? isEROrder; + bool? isCash; + int? uniqueRowID; + int? status; + int? clinicID; + int? doctorID; + String? procedureName; + String? procedureNameN; + String? clinicDescription; + String? clinicDescriptionN; + String? doctorName; + String? doctorNameN; + String? projectDescription; + String? projectDescriptionN; OBGyneProcedureListResponse( {this.setupID, diff --git a/lib/models/Appointments/PatientShareResposne.dart b/lib/models/Appointments/PatientShareResposne.dart index 40670990..ef0dd7c9 100644 --- a/lib/models/Appointments/PatientShareResposne.dart +++ b/lib/models/Appointments/PatientShareResposne.dart @@ -1,54 +1,54 @@ class PatientShareResponse { - int advanceNumber; + int? advanceNumber; dynamic appointmentDate; - int appointmentNo; - int cashPrice; - int cashPriceTax; - int cashPriceWithTax; - int clinicID; + int? appointmentNo; + int? cashPrice; + int? cashPriceTax; + int? cashPriceWithTax; + int? clinicID; dynamic clinicName; - int companyId; + int? companyId; dynamic companyName; - int companyShareWithTax; + int? companyShareWithTax; dynamic doctorImageURL; dynamic doctorNameObj; - int doctorID; - List doctorSpeciality; + int? doctorID; + List? doctorSpeciality; dynamic errCode; - int groupID; - bool iSAllowOnlineCheckedIN; + int? groupID; + bool? iSAllowOnlineCheckedIN; dynamic insurancePolicyNo; - bool isExcludedForOnlineCheckin; - int isFollowup; - bool isLiveCareAppointment; - bool isOnlineCheckedIN; + bool? isExcludedForOnlineCheckin; + int? isFollowup; + bool? isLiveCareAppointment; + bool? isOnlineCheckedIN; dynamic message; - int nextAction; + int? nextAction; dynamic patientCardID; - int patientID; + int? patientID; dynamic patientShare; dynamic patientShareWithTax; - int patientStatusType; + int? patientStatusType; dynamic patientTaxAmount; dynamic patientType; - int paymentAmount; + int? paymentAmount; dynamic paymentDate; dynamic paymentMethodName; dynamic paymentReferenceNumber; - int policyId; + int? policyId; dynamic policyName; dynamic procedureName; - int projectID; + int? projectID; dynamic projectName; dynamic setupID; - int sourceType; + int? sourceType; dynamic startTime; - int status; - int statusCode; + int? status; + int? statusCode; dynamic statusDesc; dynamic subPolicyNo; - int userID; - int serviceID; + int? userID; + int? serviceID; PatientShareResponse( {this.advanceNumber, diff --git a/lib/models/Appointments/SearchInfoModel.dart b/lib/models/Appointments/SearchInfoModel.dart index c771695c..ee1faf90 100644 --- a/lib/models/Appointments/SearchInfoModel.dart +++ b/lib/models/Appointments/SearchInfoModel.dart @@ -2,15 +2,15 @@ import 'package:diplomaticquarterapp/core/model/hospitals/hospitals_model.dart'; import 'package:diplomaticquarterapp/models/Clinics/ClinicListResponse.dart'; class SearchInfo { - int ProjectID; - int ClinicID; - String DoctorName; - String SelectedDate; - String SelectedTime; - String currentLat; - String currentLong; - DateTime date; + int? ProjectID; + int? ClinicID; + String? DoctorName; + String? SelectedDate; + String? SelectedTime; + String? currentLat; + String? currentLong; + DateTime? date; - HospitalsModel hospital; - ListClinicCentralized clinic; + HospitalsModel? hospital; + ListClinicCentralized? clinic; } diff --git a/lib/models/Appointments/appoDetailsButtons.dart b/lib/models/Appointments/appoDetailsButtons.dart index adce8b93..faec136a 100644 --- a/lib/models/Appointments/appoDetailsButtons.dart +++ b/lib/models/Appointments/appoDetailsButtons.dart @@ -1,8 +1,8 @@ class AppoDetailsButton { - String title; - String subtitle; - String icon; - String caller; + String? title; + String? subtitle; + String? icon; + String? caller; AppoDetailsButton({this.title, this.subtitle, this.icon, this.caller}); diff --git a/lib/models/Appointments/doctor_pre_post_image.dart b/lib/models/Appointments/doctor_pre_post_image.dart index cb68a472..96a738bd 100644 --- a/lib/models/Appointments/doctor_pre_post_image.dart +++ b/lib/models/Appointments/doctor_pre_post_image.dart @@ -4,29 +4,29 @@ import 'dart:typed_data'; import 'package:diplomaticquarterapp/uitl/utils.dart'; class DoctorPrePostImages { - DoctorPrePostImageModel pre; - DoctorPrePostImageModel post; + DoctorPrePostImageModel? pre; + DoctorPrePostImageModel? post; Uint8List getPreBytes(){ try{ - var b64 = pre.imageStr.replaceFirst('data:image/png;base64,', ''); - if(pre.imageStr != null && isBase64(b64)) + var b64 = pre!.imageStr!.replaceFirst('data:image/png;base64,', ''); + if(pre!.imageStr != null && isBase64(b64)) return Utils.dataFromBase64String(b64); }catch(e){ } - return null; + return Uint8List(0); } Uint8List getPostBytes(){ try{ - var b64 = post.imageStr.replaceFirst('data:image/png;base64,', ''); - if(post.imageStr != null && isBase64(b64)) + var b64 = post!.imageStr!.replaceFirst('data:image/png;base64,', ''); + if(post!.imageStr != null && isBase64(b64)) return Utils.dataFromBase64String(b64); }catch(e){ } - return null; + return Uint8List(0); } bool isBase64(String str) { @@ -37,18 +37,18 @@ class DoctorPrePostImages { } class DoctorPrePostImageModel { - String setupID; - int projectID; - int clinicId; - int doctorId; - int lineItemNo; - String imageStr; - int imageType; - String description; + String? setupID; + int? projectID; + int? clinicId; + int? doctorId; + int? lineItemNo; + String? imageStr; + int? imageType; + String? description; dynamic isNewUpdated; - bool isActive; - String createdOn; - int createdBy; + bool? isActive; + String? createdOn; + int? createdBy; dynamic editedOn; dynamic editedBy; diff --git a/lib/models/Appointments/laser_body_parts.dart b/lib/models/Appointments/laser_body_parts.dart index 99896868..d7d3fbd1 100644 --- a/lib/models/Appointments/laser_body_parts.dart +++ b/lib/models/Appointments/laser_body_parts.dart @@ -1,17 +1,17 @@ class LaserBodyPart { - int id; - int category; - String bodyPart; - bool fullBoadyPart; - bool isRetouch; - String timeDuration; - String bodyPartN; - bool isActive; - String mappingCode; - int procedureID; - int orderNum; - String categoryName; - String categoryNameN; + int? id; + int? category; + String? bodyPart; + bool? fullBoadyPart; + bool? isRetouch; + String? timeDuration; + String? bodyPartN; + bool? isActive; + String? mappingCode; + int? procedureID; + int? orderNum; + String? categoryName; + String? categoryNameN; LaserBodyPart( {this.id, diff --git a/lib/models/Appointments/timeSlot.dart b/lib/models/Appointments/timeSlot.dart index b7f1a8cc..ccddc2d9 100644 --- a/lib/models/Appointments/timeSlot.dart +++ b/lib/models/Appointments/timeSlot.dart @@ -1,10 +1,10 @@ import 'package:flutter/cupertino.dart'; class TimeSlot { - String isoTime; - DateTime start; - DateTime end; - String vidaDate; + String? isoTime; + DateTime? start; + DateTime? end; + String? vidaDate; TimeSlot({@required this.isoTime, @required this.start, @required this.end, this.vidaDate}); } diff --git a/lib/models/Appointments/toDoCountProviderModel.dart b/lib/models/Appointments/toDoCountProviderModel.dart index 3363471f..ab04b53f 100644 --- a/lib/models/Appointments/toDoCountProviderModel.dart +++ b/lib/models/Appointments/toDoCountProviderModel.dart @@ -1,15 +1,15 @@ import 'package:flutter/cupertino.dart'; class ToDoCountProviderModel with ChangeNotifier { - int _count; - String _notificationsCount; - bool _isShowBadge = false; + int? _count; + String? _notificationsCount; + bool? _isShowBadge = false; - int get count => _count == null ? 0 : _count; + int get count => _count == null ? 0 : _count!; - String get notificationsCount => _notificationsCount == null ? "0" : _notificationsCount; + String get notificationsCount => _notificationsCount == null ? "0" : _notificationsCount!; - bool get isShowBadge => _isShowBadge; + bool get isShowBadge => _isShowBadge!; void setState(int count, bool isShowBadge, String notifCount) { _count = count; diff --git a/lib/models/Authentication/authenticated_user.dart b/lib/models/Authentication/authenticated_user.dart index eacba6a5..0d2b3544 100644 --- a/lib/models/Authentication/authenticated_user.dart +++ b/lib/models/Authentication/authenticated_user.dart @@ -1,62 +1,62 @@ import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; class AuthenticatedUser { - String setupID; - int patientType; - int patientID; - String firstName; - String middleName; - String lastName; - String firstNameN; - String middleNameN; - String lastNameN; - int relationshipID; - int gender; - String dateofBirth; - DateTime dateofBirthDataTime; + String? setupID; + int? patientType; + int? patientID; + String? firstName; + String? middleName; + String? lastName; + String? firstNameN; + String? middleNameN; + String? lastNameN; + int? relationshipID; + int? gender; + String? dateofBirth; + DateTime? dateofBirthDataTime; dynamic dateofBirthN; - String nationalityID; + String? nationalityID; dynamic phoneResi; dynamic phoneOffice; - String mobileNumber; + String? mobileNumber; dynamic faxNumber; - String emailAddress; + String? emailAddress; dynamic bloodGroup; dynamic rHFactor; - bool isEmailAlertRequired; - bool isSMSAlertRequired; - String preferredLanguage; - bool isPrivilegedMember; + bool? isEmailAlertRequired; + bool? isSMSAlertRequired; + String? preferredLanguage; + bool? isPrivilegedMember; dynamic memberID; dynamic expiryDate; dynamic isHmgEmployee; dynamic employeeID; dynamic emergencyContactName; dynamic emergencyContactNo; - int patientPayType; + int? patientPayType; dynamic dHCCPatientRefID; - bool isPatientDummy; - int status; + bool? isPatientDummy; + int? status; dynamic isStatusCleared; - int patientIdentificationType; - String patientIdentificationNo; - int projectID; - int infoSourceID; + int? patientIdentificationType; + String? patientIdentificationNo; + int? projectID; + int? infoSourceID; dynamic address; - int age; - String ageDesc; - int areaID; - int createdBy; - String genderDescription; + int? age; + String? ageDesc; + int? areaID; + int? createdBy; + String? genderDescription; dynamic iR; dynamic iSOCityID; dynamic iSOCountryID; - List listPrivilege; + List? listPrivilege; dynamic marital; - int outSA; + int? outSA; dynamic pOBox; - bool receiveHealthSummaryReport; - int sourceType; + bool? receiveHealthSummaryReport; + int? sourceType; dynamic strDateofBirth; dynamic tempAddress; dynamic zipCode; @@ -180,9 +180,9 @@ class AuthenticatedUser { iSOCityID = json['ISOCityID']; iSOCountryID = json['ISOCountryID']; if (json['ListPrivilege'] != null) { - listPrivilege = new List(); + listPrivilege = []; json['ListPrivilege'].forEach((v) { - listPrivilege.add(new ListPrivilege.fromJson(v)); + listPrivilege!.add(new ListPrivilege.fromJson(v)); }); } marital = json['Marital']; @@ -250,7 +250,7 @@ class AuthenticatedUser { data['ISOCountryID'] = this.iSOCountryID; if (this.listPrivilege != null) { data['ListPrivilege'] = - this.listPrivilege.map((v) => v.toJson()).toList(); + this.listPrivilege!.map((v) => v.toJson()).toList(); } data['Marital'] = this.marital; data['OutSA'] = this.outSA; @@ -267,9 +267,9 @@ class AuthenticatedUser { } class ListPrivilege { - int iD; - String serviceName; - bool previlege; + int? iD; + String? serviceName; + bool? previlege; dynamic region; ListPrivilege({this.iD, this.serviceName, this.previlege, this.region}); diff --git a/lib/models/Authentication/check_activation_code_request.dart b/lib/models/Authentication/check_activation_code_request.dart index f6509f3b..84a0d9ab 100644 --- a/lib/models/Authentication/check_activation_code_request.dart +++ b/lib/models/Authentication/check_activation_code_request.dart @@ -1,28 +1,28 @@ class CheckActivationCodeReq { - int patientMobileNumber; - String mobileNo; - String deviceToken; - bool projectOutSA; - int loginType; - String zipCode; - bool isRegister; - String logInTokenID; - int searchType; - int patientID; - String nationalID; - String patientIdentificationID; - String activationCode; - bool isSilentLogin; - double versionID; - int channel; - int languageID; - String iPAdress; - String generalid; - int patientOutSA; + int? patientMobileNumber; + String? mobileNo; + String? deviceToken; + bool? projectOutSA; + int? loginType; + String? zipCode; + bool? isRegister; + String? logInTokenID; + int? searchType; + int? patientID; + String? nationalID; + String? patientIdentificationID; + String? activationCode; + bool? isSilentLogin; + double? versionID; + int? channel; + int? languageID; + String? iPAdress; + String? generalid; + int? patientOutSA; Null sessionID; - bool isDentalAllowedBackend; - int deviceTypeID; - bool forRegisteration; + bool? isDentalAllowedBackend; + int? deviceTypeID; + bool? forRegisteration; CheckActivationCodeReq({ this.patientMobileNumber, diff --git a/lib/models/Authentication/check_activation_code_request_register.dart b/lib/models/Authentication/check_activation_code_request_register.dart index c727c647..6de96c5a 100644 --- a/lib/models/Authentication/check_activation_code_request_register.dart +++ b/lib/models/Authentication/check_activation_code_request_register.dart @@ -1,31 +1,32 @@ class CheckActivationCodeRegisterReq { - int patientMobileNumber; - String mobileNo; - String deviceToken; - bool projectOutSA; - int loginType; - String zipCode; - bool isRegister; - String logInTokenID; - int searchType; - int patientID; - String nationalID; - String patientIdentificationID; - String activationCode; - bool isSilentLogin; - double versionID; - int channel; - int languageID; - String iPAdress; - String generalid; - int patientOutSA; + int? patientMobileNumber; + String? mobileNo; + String? deviceToken; + bool? projectOutSA; + int? loginType; + String? zipCode; + bool? isRegister; + String? logInTokenID; + int? searchType; + int? patientID; + String? nationalID; + String? patientIdentificationID; + String? activationCode; + bool? isSilentLogin; + double? versionID; + int? channel; + int? languageID; + String? iPAdress; + String? generalid; + int? patientOutSA; Null sessionID; - bool isDentalAllowedBackend; - int deviceTypeID; - bool forRegisteration; - String dob; - int isHijri; - String healthId; + bool? isDentalAllowedBackend; + int? deviceTypeID; + bool? forRegisteration; + String? dob; + int? isHijri; + String? healthId; + CheckActivationCodeRegisterReq({ this.patientMobileNumber, this.mobileNo, diff --git a/lib/models/Authentication/check_activation_code_response.dart b/lib/models/Authentication/check_activation_code_response.dart index 3a0aed65..2fa18a5e 100644 --- a/lib/models/Authentication/check_activation_code_response.dart +++ b/lib/models/Authentication/check_activation_code_response.dart @@ -2,26 +2,26 @@ import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.da class CheckActivationCode { dynamic date; - int languageID; - int serviceName; + int? languageID; + int? serviceName; dynamic time; dynamic androidLink; - String authenticationTokenID; + String? authenticationTokenID; dynamic data; - bool dataw; - int dietType; + bool? dataw; + int? dietType; dynamic errorCode; dynamic errorEndUserMessage; dynamic errorEndUserMessageN; dynamic errorMessage; - int errorType; - int foodCategory; + int? errorType; + int? foodCategory; dynamic iOSLink; - bool isAuthenticated; - int mealOrderStatus; - int mealType; - int messageStatus; - int numberOfResultRecords; + bool? isAuthenticated; + int? mealOrderStatus; + int? mealType; + int? messageStatus; + int? numberOfResultRecords; dynamic patientBlodType; dynamic successMsg; dynamic successMsgN; @@ -29,11 +29,11 @@ class CheckActivationCode { dynamic getAllPendingRecordsList; dynamic getAllSharedRecordsByStatusList; dynamic getResponseFileList; - bool isHMGPatient; - bool isLoginSuccessfully; - bool isNeedUpdateIdintificationNo; - bool kioskSendSMS; - AuthenticatedUser list; + bool? isHMGPatient; + bool? isLoginSuccessfully; + bool? isNeedUpdateIdintificationNo; + bool? kioskSendSMS; + AuthenticatedUser? list; dynamic listAskHabibMobileLoginInfo; dynamic listAskHabibPatientFile; dynamic listMergeFiles; @@ -41,29 +41,29 @@ class CheckActivationCode { dynamic listPatientCount; dynamic logInTokenID; dynamic mohemmPrivilegeList; - int pateintID; - String patientBloodType; - bool patientHasFile; + int? pateintID; + String? patientBloodType; + bool? patientHasFile; dynamic patientMergedIDs; - bool patientOutSA; - int patientShareRequestID; - int patientType; - int projectIDOut; + bool? patientOutSA; + int? patientShareRequestID; + int? patientType; + int? projectIDOut; dynamic returnMessage; - bool sMSLoginRequired; + bool? sMSLoginRequired; dynamic servicePrivilegeList; dynamic sharePatientName; dynamic verificationCode; dynamic email; dynamic errorList; - bool hasFile; - bool isActiveCode; - bool isMerged; - bool isNeedUserAgreement; - bool isSMSSent; + bool? hasFile; + bool? isActiveCode; + bool? isMerged; + bool? isNeedUserAgreement; + bool? isSMSSent; dynamic memberList; dynamic message; - int statusCode; + int? statusCode; CheckActivationCode( {this.date, @@ -271,61 +271,61 @@ class CheckActivationCode { } class List { - String setupID; - int patientType; - int patientID; - String firstName; - String middleName; - String lastName; - String firstNameN; - String middleNameN; - String lastNameN; - int relationshipID; - int gender; - String dateofBirth; + String? setupID; + int? patientType; + int? patientID; + String? firstName; + String? middleName; + String? lastName; + String? firstNameN; + String? middleNameN; + String? lastNameN; + int? relationshipID; + int? gender; + String? dateofBirth; dynamic dateofBirthN; - String nationalityID; + String? nationalityID; dynamic phoneResi; dynamic phoneOffice; - String mobileNumber; + String? mobileNumber; dynamic faxNumber; - String emailAddress; + String? emailAddress; dynamic bloodGroup; dynamic rHFactor; - bool isEmailAlertRequired; - bool isSMSAlertRequired; - String preferredLanguage; - bool isPrivilegedMember; + bool? isEmailAlertRequired; + bool? isSMSAlertRequired; + String? preferredLanguage; + bool? isPrivilegedMember; dynamic memberID; dynamic expiryDate; dynamic isHmgEmployee; dynamic employeeID; dynamic emergencyContactName; dynamic emergencyContactNo; - int patientPayType; + int? patientPayType; dynamic dHCCPatientRefID; - bool isPatientDummy; - int status; + bool? isPatientDummy; + int? status; dynamic isStatusCleared; - int patientIdentificationType; - String patientIdentificationNo; - int projectID; - int infoSourceID; + int? patientIdentificationType; + String? patientIdentificationNo; + int? projectID; + int? infoSourceID; dynamic address; - int age; - String ageDesc; - int areaID; - int createdBy; - String genderDescription; + int? age; + String? ageDesc; + int? areaID; + int? createdBy; + String? genderDescription; dynamic iR; dynamic iSOCityID; dynamic iSOCountryID; - ListPrivilege listPrivilege; + ListPrivilege? listPrivilege; dynamic marital; - int outSA; + int? outSA; dynamic pOBox; - bool receiveHealthSummaryReport; - int sourceType; + bool? receiveHealthSummaryReport; + int? sourceType; dynamic strDateofBirth; dynamic tempAddress; dynamic zipCode; @@ -522,9 +522,9 @@ class List { } class ListPrivilege { - int iD; - String serviceName; - bool previlege; + int? iD; + String? serviceName; + bool? previlege; dynamic region; ListPrivilege({this.iD, this.serviceName, this.previlege, this.region}); diff --git a/lib/models/Authentication/check_paitent_authentication_req.dart b/lib/models/Authentication/check_paitent_authentication_req.dart index 76493f87..7d0eeb37 100644 --- a/lib/models/Authentication/check_paitent_authentication_req.dart +++ b/lib/models/Authentication/check_paitent_authentication_req.dart @@ -1,23 +1,23 @@ class CheckPatientAuthenticationReq { - int patientMobileNumber; - String zipCode; - bool isRegister; - String tokenID; - int searchType; - String patientIdentificationID; - int patientID; - double versionID; - int channel; - int languageID; - String iPAdress; - String generalid; - int patientOutSA; + int? patientMobileNumber; + String? zipCode; + bool? isRegister; + String? tokenID; + int? searchType; + String? patientIdentificationID; + int? patientID; + double? versionID; + int? channel; + int? languageID; + String? iPAdress; + String? generalid; + int? patientOutSA; Null sessionID; - bool isDentalAllowedBackend; - int deviceTypeID; - String dob; - int isHijri; - String healthId; + bool? isDentalAllowedBackend; + int? deviceTypeID; + String? dob; + int? isHijri; + String? healthId; CheckPatientAuthenticationReq( {this.patientMobileNumber, this.zipCode, diff --git a/lib/models/Authentication/check_user_status_reponse.dart b/lib/models/Authentication/check_user_status_reponse.dart index 342eaad0..d5c7b618 100644 --- a/lib/models/Authentication/check_user_status_reponse.dart +++ b/lib/models/Authentication/check_user_status_reponse.dart @@ -1,67 +1,67 @@ class CheckUserStatusResponse { Null date; - int languageID; - int serviceName; + int? languageID; + int? serviceName; Null time; Null androidLink; Null authenticationTokenID; Null data; - bool dataw; - int dietType; + bool? dataw; + int? dietType; Null errorCode; Null errorEndUserMessage; Null errorEndUserMessageN; Null errorMessage; - int errorType; - int foodCategory; + int? errorType; + int? foodCategory; Null iOSLink; - bool isAuthenticated; - int mealOrderStatus; - int mealType; - int messageStatus; - int numberOfResultRecords; + bool? isAuthenticated; + int? mealOrderStatus; + int? mealType; + int? messageStatus; + int? numberOfResultRecords; Null patientBlodType; Null successMsg; Null successMsgN; Null accessTokenObject; - int age; + int? age; Null clientIdentifierId; - int createdBy; - String dateOfBirth; - String firstNameAr; - String firstNameEn; - String gender; + int? createdBy; + String? dateOfBirth; + String? firstNameAr; + String? firstNameEn; + String? gender; Null genderAr; Null genderEn; - String healthId; - String idNumber; - String idType; - bool isHijri; - int isInstertedOrUpdated; - int isNull; - int isPatientExistNHIC; - String lastNameAr; - String lastNameEn; + String? healthId; + String? idNumber; + String? idType; + bool? isHijri; + int? isInstertedOrUpdated; + int? isNull; + int? isPatientExistNHIC; + String? lastNameAr; + String? lastNameEn; Null listActiveAccessToken; - String maritalStatus; - String maritalStatusCode; - String nationality; - String nationalityCode; - String occupation; - String patientStatus; - String placeofBirth; + String? maritalStatus; + String? maritalStatusCode; + String? nationality; + String? nationalityCode; + String? occupation; + String? patientStatus; + String? placeofBirth; Null practitionerStatusCode; Null practitionerStatusDescAr; Null practitionerStatusDescEn; - String secondNameAr; - String secondNameEn; - String thirdNameAr; - String thirdNameEn; + String? secondNameAr; + String? secondNameEn; + String? thirdNameAr; + String? thirdNameEn; Null accessToken; - int categoryCode; + int? categoryCode; Null categoryNameAr; Null categoryNameEn; - int constraintCode; + int? constraintCode; Null constraintNameAr; Null constraintNameEn; Null content; @@ -72,7 +72,7 @@ class CheckUserStatusResponse { Null licenseStatusDescEn; Null organizations; Null registrationNumber; - int specialtyCode; + int? specialtyCode; Null specialtyNameAr; Null specialtyNameEn; diff --git a/lib/models/Authentication/check_user_status_req.dart b/lib/models/Authentication/check_user_status_req.dart index 40dd8b49..00282fe9 100644 --- a/lib/models/Authentication/check_user_status_req.dart +++ b/lib/models/Authentication/check_user_status_req.dart @@ -1,16 +1,16 @@ class CheckUserStatusRequest { - String patientIdentificationID; - String dOB; - int isHijri; - double versionID; - int channel; - int languageID; - String iPAdress; - String generalid; - int patientOutSA; + String? patientIdentificationID; + String? dOB; + int? isHijri; + double? versionID; + int? channel; + int? languageID; + String? iPAdress; + String? generalid; + int? patientOutSA; Null sessionID; - bool isDentalAllowedBackend; - int deviceTypeID; + bool? isDentalAllowedBackend; + int? deviceTypeID; CheckUserStatusRequest( {this.patientIdentificationID, diff --git a/lib/models/Authentication/checkpatient_for_registration.dart b/lib/models/Authentication/checkpatient_for_registration.dart index def8925f..9f165e3b 100644 --- a/lib/models/Authentication/checkpatient_for_registration.dart +++ b/lib/models/Authentication/checkpatient_for_registration.dart @@ -1,21 +1,21 @@ class CheckPatientForRegistration { - int patientIdentificationID; - int patientMobileNumber; - String zipCode; - double versionID; - int channel; - int languageID; - String iPAdress; - String generalid; - int patientOutSA; + int? patientIdentificationID; + int? patientMobileNumber; + String? zipCode; + double? versionID; + int? channel; + int? languageID; + String? iPAdress; + String? generalid; + int? patientOutSA; Null sessionID; - bool isDentalAllowedBackend; - int deviceTypeID; - String tokenID; - int patientID; - bool isRegister; - String dob; - int isHijri; + bool? isDentalAllowedBackend; + int? deviceTypeID; + String? tokenID; + int? patientID; + bool? isRegister; + String? dob; + int? isHijri; CheckPatientForRegistration( {this.patientIdentificationID, diff --git a/lib/models/Authentication/countries_list.dart b/lib/models/Authentication/countries_list.dart index 3c314da9..157e9291 100644 --- a/lib/models/Authentication/countries_list.dart +++ b/lib/models/Authentication/countries_list.dart @@ -1,6 +1,6 @@ class CountriesLists { - String iD; - String name; + String? iD; + String? name; dynamic nameN; CountriesLists({this.iD, this.name, this.nameN}); diff --git a/lib/models/Authentication/get_mobile_info_request.dart b/lib/models/Authentication/get_mobile_info_request.dart index 51a58d88..d870b038 100644 --- a/lib/models/Authentication/get_mobile_info_request.dart +++ b/lib/models/Authentication/get_mobile_info_request.dart @@ -1,25 +1,25 @@ class GetMobileLoginInfoRequest { - int patientMobileNumber; - String mobileNo; - String deviceToken; - int projectOutSA; - int loginType; - String zipCode; - bool isRegister; - String logInTokenID; - int searchType; - int patientID; - String nationalID; - String patientIdentificationID; - double versionID; - int channel; - int languageID; - String iPAdress; - String generalid; - int patientOutSA; + int? patientMobileNumber; + String? mobileNo; + String? deviceToken; + int? projectOutSA; + int? loginType; + String? zipCode; + bool? isRegister; + String? logInTokenID; + int? searchType; + int? patientID; + String? nationalID; + String? patientIdentificationID; + double? versionID; + int? channel; + int? languageID; + String? iPAdress; + String? generalid; + int? patientOutSA; Null sessionID; - bool isDentalAllowedBackend; - int deviceTypeID; + bool? isDentalAllowedBackend; + int? deviceTypeID; GetMobileLoginInfoRequest( {this.patientMobileNumber, diff --git a/lib/models/Authentication/get_mobile_info_response.dart b/lib/models/Authentication/get_mobile_info_response.dart index 562c82dd..5368f9ee 100644 --- a/lib/models/Authentication/get_mobile_info_response.dart +++ b/lib/models/Authentication/get_mobile_info_response.dart @@ -1,25 +1,25 @@ class GetMobileLoginInfoResponse { Null date; - int languageID; - int serviceName; + int? languageID; + int? serviceName; Null time; Null androidLink; Null authenticationTokenID; Null data; - bool dataw; - int dietType; + bool? dataw; + int? dietType; Null errorCode; Null errorEndUserMessage; Null errorEndUserMessageN; Null errorMessage; - int errorType; - int foodCategory; + int? errorType; + int? foodCategory; Null iOSLink; - bool isAuthenticated; - int mealOrderStatus; - int mealType; - int messageStatus; - int numberOfResultRecords; + bool? isAuthenticated; + int? mealOrderStatus; + int? mealType; + int? messageStatus; + int? numberOfResultRecords; Null patientBlodType; Null successMsg; Null successMsgN; @@ -27,41 +27,41 @@ class GetMobileLoginInfoResponse { Null getAllPendingRecordsList; Null getAllSharedRecordsByStatusList; Null getResponseFileList; - bool isHMGPatient; - bool isLoginSuccessfully; - bool isNeedUpdateIdintificationNo; - bool kioskSendSMS; + bool? isHMGPatient; + bool? isLoginSuccessfully; + bool? isNeedUpdateIdintificationNo; + bool? kioskSendSMS; Null list; Null listAskHabibMobileLoginInfo; Null listAskHabibPatientFile; Null listMergeFiles; - List listMobileLoginInfo; + List? listMobileLoginInfo; Null listPatientCount; - String logInTokenID; + String? logInTokenID; Null mohemmPrivilegeList; - int pateintID; + int? pateintID; Null patientBloodType; - bool patientHasFile; + bool? patientHasFile; Null patientMergedIDs; - bool patientOutSA; - int patientShareRequestID; - int patientType; - int projectIDOut; + bool? patientOutSA; + int? patientShareRequestID; + int? patientType; + int? projectIDOut; Null returnMessage; - bool sMSLoginRequired; + bool? sMSLoginRequired; Null servicePrivilegeList; Null sharePatientName; Null verificationCode; Null email; Null errorList; - bool hasFile; - bool isActiveCode; - bool isMerged; - bool isNeedUserAgreement; - bool isSMSSent; + bool? hasFile; + bool? isActiveCode; + bool? isMerged; + bool? isNeedUserAgreement; + bool? isSMSSent; Null memberList; Null message; - int statusCode; + int? statusCode; GetMobileLoginInfoResponse( {this.date, @@ -166,9 +166,9 @@ class GetMobileLoginInfoResponse { listAskHabibPatientFile = json['List_AskHabibPatientFile']; listMergeFiles = json['List_MergeFiles']; if (json['List_MobileLoginInfo'] != null) { - listMobileLoginInfo = new List(); + listMobileLoginInfo = []; json['List_MobileLoginInfo'].forEach((v) { - listMobileLoginInfo.add(new ListMobileLoginInfo.fromJson(v)); + listMobileLoginInfo!.add(new ListMobileLoginInfo.fromJson(v)); }); } listPatientCount = json['List_PatientCount']; @@ -240,7 +240,7 @@ class GetMobileLoginInfoResponse { data['List_MergeFiles'] = this.listMergeFiles; if (this.listMobileLoginInfo != null) { data['List_MobileLoginInfo'] = - this.listMobileLoginInfo.map((v) => v.toJson()).toList(); + this.listMobileLoginInfo!.map((v) => v.toJson()).toList(); } data['List_PatientCount'] = this.listPatientCount; data['LogInTokenID'] = this.logInTokenID; @@ -273,8 +273,8 @@ class GetMobileLoginInfoResponse { } class ListMobileLoginInfo { - int iD; - int loginType; + int? iD; + int? loginType; ListMobileLoginInfo({this.iD, this.loginType}); diff --git a/lib/models/Authentication/insert_device_imei_request.dart b/lib/models/Authentication/insert_device_imei_request.dart index 02e3b278..82902fe3 100644 --- a/lib/models/Authentication/insert_device_imei_request.dart +++ b/lib/models/Authentication/insert_device_imei_request.dart @@ -1,19 +1,19 @@ class INSERTDeviceIMEIRequest { - String setupID; - int patientType; - int patientID; - String firstName; - String firstNameN; - String lastNameN; - int preferredLanguage; - String patientIdentificationNo; - bool outSA; - String identificationNo; - String mobileNo; - String tokenID; - String iMEI; - bool biometricEnabled; - int logInTypeID; + String? setupID; + int? patientType; + int? patientID; + String? firstName; + String? firstNameN; + String? lastNameN; + int? preferredLanguage; + String? patientIdentificationNo; + bool? outSA; + String? identificationNo; + String? mobileNo; + String? tokenID; + String? iMEI; + bool? biometricEnabled; + int? logInTypeID; INSERTDeviceIMEIRequest( {this.setupID, diff --git a/lib/models/Authentication/register_info_response.dart b/lib/models/Authentication/register_info_response.dart index 309a8aa9..a51b1b14 100644 --- a/lib/models/Authentication/register_info_response.dart +++ b/lib/models/Authentication/register_info_response.dart @@ -1,67 +1,67 @@ class RegisterInfoResponse { Null date; - int languageID; - int serviceName; + int? languageID; + int? serviceName; Null time; Null androidLink; Null authenticationTokenID; Null data; - bool dataw; - int dietType; + bool? dataw; + int? dietType; Null errorCode; Null errorEndUserMessage; Null errorEndUserMessageN; Null errorMessage; - int errorType; - int foodCategory; + int? errorType; + int? foodCategory; Null iOSLink; - bool isAuthenticated; - int mealOrderStatus; - int mealType; - int messageStatus; - int numberOfResultRecords; + bool? isAuthenticated; + int? mealOrderStatus; + int? mealType; + int? messageStatus; + int? numberOfResultRecords; Null patientBlodType; Null successMsg; Null successMsgN; Null accessTokenObject; - int age; + int? age; Null clientIdentifierId; - int createdBy; - String dateOfBirth; - String firstNameAr; - String firstNameEn; - String gender; + int? createdBy; + String? dateOfBirth; + String? firstNameAr; + String? firstNameEn; + String? gender; Null genderAr; Null genderEn; - String healthId; - String idNumber; - String idType; - bool isHijri; - int isInstertedOrUpdated; - int isNull; - int isPatientExistNHIC; - String lastNameAr; - String lastNameEn; + String? healthId; + String? idNumber; + String? idType; + bool? isHijri; + int? isInstertedOrUpdated; + int? isNull; + int? isPatientExistNHIC; + String? lastNameAr; + String? lastNameEn; Null listActiveAccessToken; - String maritalStatus; - String maritalStatusCode; - String nationality; - String nationalityCode; - String occupation; - String patientStatus; - String placeofBirth; + String? maritalStatus; + String? maritalStatusCode; + String? nationality; + String? nationalityCode; + String? occupation; + String? patientStatus; + String? placeofBirth; Null practitionerStatusCode; Null practitionerStatusDescAr; Null practitionerStatusDescEn; - String secondNameAr; - String secondNameEn; - String thirdNameAr; - String thirdNameEn; + String? secondNameAr; + String? secondNameEn; + String? thirdNameAr; + String? thirdNameEn; Null accessToken; - int categoryCode; + int? categoryCode; Null categoryNameAr; Null categoryNameEn; - int constraintCode; + int? constraintCode; Null constraintNameAr; Null constraintNameEn; Null content; @@ -72,7 +72,7 @@ class RegisterInfoResponse { Null licenseStatusDescEn; Null organizations; Null registrationNumber; - int specialtyCode; + int? specialtyCode; Null specialtyNameAr; Null specialtyNameEn; diff --git a/lib/models/Authentication/register_user_requet.dart b/lib/models/Authentication/register_user_requet.dart index 63cb9e8a..71549d80 100644 --- a/lib/models/Authentication/register_user_requet.dart +++ b/lib/models/Authentication/register_user_requet.dart @@ -1,21 +1,21 @@ class RegisterUserRequest { - Patientobject patientobject; - String patientIdentificationID; + Patientobject? patientobject; + String? patientIdentificationID; dynamic patientMobileNumber; - String logInTokenID; - double versionID; - int channel; - int languageID; - String iPAdress; - String generalid; - int patientOutSA; + String? logInTokenID; + double? versionID; + int? channel; + int? languageID; + String? iPAdress; + String? generalid; + int? patientOutSA; Null sessionID; - bool isDentalAllowedBackend; - int deviceTypeID; - String dob; - int isHijri; - String healthId; - String zipCode; + bool? isDentalAllowedBackend; + int? deviceTypeID; + String? dob; + int? isHijri; + String? healthId; + String? zipCode; RegisterUserRequest( {this.patientobject, this.patientIdentificationID, @@ -58,7 +58,7 @@ class RegisterUserRequest { Map toJson() { final Map data = new Map(); if (this.patientobject != null) { - data['Patientobject'] = this.patientobject.toJson(); + data['Patientobject'] = this.patientobject!.toJson(); } data['PatientIdentificationID'] = this.patientIdentificationID; data['PatientMobileNumber'] = this.patientMobileNumber; @@ -81,27 +81,27 @@ class RegisterUserRequest { } class Patientobject { - bool tempValue; - int patientIdentificationType; - String patientIdentificationNo; + bool? tempValue; + int? patientIdentificationType; + String? patientIdentificationNo; dynamic mobileNumber; - int patientOutSA; - String firstName; - String middleName; - String lastName; - String firstNameN; - String middleNameN; - String lastNameN; + int? patientOutSA; + String? firstName; + String? middleName; + String? lastName; + String? firstNameN; + String? middleNameN; + String? lastNameN; dynamic strDateofBirth; - String dateofBirth; - int gender; - String nationalityID; - String eHealthIDField; - String dateofBirthN; - String emailAddress; - String sourceType; - String preferredLanguage; - String marital; + String? dateofBirth; + int? gender; + String? nationalityID; + String? eHealthIDField; + String? dateofBirthN; + String? emailAddress; + String? sourceType; + String? preferredLanguage; + String? marital; Patientobject( {this.tempValue, diff --git a/lib/models/Authentication/registered_authenticated_user_req.dart b/lib/models/Authentication/registered_authenticated_user_req.dart index c261d062..4b39ccc9 100644 --- a/lib/models/Authentication/registered_authenticated_user_req.dart +++ b/lib/models/Authentication/registered_authenticated_user_req.dart @@ -1,27 +1,27 @@ class RegisteredAuthenticatedUserRequest { - double versionID; - int channel; - int languageID; - String iPAdress; - String generalid; - int patientOutSA; - String sessionID; - bool isDentalAllowedBackend; - int deviceTypeID; - int patientID; - String tokenID; - String voipToken; - int patientTypeID; - int patientType; - String deviceToken; - String deviceType; - String patientMobileNumber; - String nationalID; - int gender; - int loginType; - String mACAddress; - int latitude; - int longitude; + double? versionID; + int? channel; + int? languageID; + String? iPAdress; + String? generalid; + int? patientOutSA; + String? sessionID; + bool? isDentalAllowedBackend; + int? deviceTypeID; + int? patientID; + String? tokenID; + String? voipToken; + int? patientTypeID; + int? patientType; + String? deviceToken; + String? deviceType; + String? patientMobileNumber; + String? nationalID; + int? gender; + int? loginType; + String? mACAddress; + int? latitude; + int? longitude; RegisteredAuthenticatedUserRequest( {this.versionID, diff --git a/lib/models/Authentication/select_device_imei_res.dart b/lib/models/Authentication/select_device_imei_res.dart index 14444279..41734165 100644 --- a/lib/models/Authentication/select_device_imei_res.dart +++ b/lib/models/Authentication/select_device_imei_res.dart @@ -1,18 +1,18 @@ class SelectDeviceIMEIRES { - bool biometricEnabled; - String createdOn; - String editedOn; - int iD; - String iMEI; - String identificationNo; - int logInType; - String mobile; - String name; - String nameN; - bool outSA; - int patientID; - int patientType; - int preferredLanguage; + bool? biometricEnabled; + String? createdOn; + String? editedOn; + int? iD; + String? iMEI; + String? identificationNo; + int? logInType; + String? mobile; + String? name; + String? nameN; + bool? outSA; + int? patientID; + int? patientType; + int? preferredLanguage; SelectDeviceIMEIRES( {this.biometricEnabled, diff --git a/lib/models/Authentication/send_activation_request.dart b/lib/models/Authentication/send_activation_request.dart index fbaa744c..738e212d 100644 --- a/lib/models/Authentication/send_activation_request.dart +++ b/lib/models/Authentication/send_activation_request.dart @@ -1,34 +1,34 @@ class SendActivationRequest { - int patientMobileNumber; - String mobileNo; - String deviceToken; - bool projectOutSA; - int loginType; - String zipCode; - bool isRegister; - String logInTokenID; - int searchType; - int patientID; - String nationalID; - String patientIdentificationID; - int oTPSendType; - int languageID; - double versionID; - int channel; - String iPAdress; - String generalid; - int patientOutSA; + int? patientMobileNumber; + String? mobileNo; + String? deviceToken; + bool? projectOutSA; + int? loginType; + String? zipCode; + bool? isRegister; + String? logInTokenID; + int? searchType; + int? patientID; + String? nationalID; + String? patientIdentificationID; + int? oTPSendType; + int? languageID; + double? versionID; + int? channel; + String? iPAdress; + String? generalid; + int? patientOutSA; Null sessionID; - bool isDentalAllowedBackend; - int deviceTypeID; - String sMSSignature; - String dob; - int isHijri; - String healthId; - int responseID; - int status; - int familyRegionID; - bool isPatientExcluded; + bool? isDentalAllowedBackend; + int? deviceTypeID; + String? sMSSignature; + String? dob; + int? isHijri; + String? healthId; + int? responseID; + int? status; + int? familyRegionID; + bool? isPatientExcluded; SendActivationRequest( {this.patientMobileNumber, this.mobileNo, diff --git a/lib/models/Clinics/ClinicListResponse.dart b/lib/models/Clinics/ClinicListResponse.dart index 6aadabc0..cca958bd 100644 --- a/lib/models/Clinics/ClinicListResponse.dart +++ b/lib/models/Clinics/ClinicListResponse.dart @@ -1,12 +1,12 @@ class ListClinicCentralized { - int clinicID; - String clinicDescription; - String clinicDescriptionN; - int age; - int gender; - bool isLiveCareClinicAndOnline; - int liveCareClinicID; - int liveCareServiceID; + int? clinicID; + String? clinicDescription; + String? clinicDescriptionN; + int? age; + int? gender; + bool? isLiveCareClinicAndOnline; + int? liveCareClinicID; + int? liveCareServiceID; ListClinicCentralized( {this.clinicID, @@ -50,11 +50,11 @@ class ListClinicCentralized { } class ListGetBookScheduleConfigsList { - int iD; - String description; + int? iD; + String? description; Null descriptionN; - bool value; - bool isActive; + bool? value; + bool? isActive; ListGetBookScheduleConfigsList( {this.iD, diff --git a/lib/models/CovidDriveThru/CovidPaymentInfoResponse.dart b/lib/models/CovidDriveThru/CovidPaymentInfoResponse.dart index a1290e4d..35342c26 100644 --- a/lib/models/CovidDriveThru/CovidPaymentInfoResponse.dart +++ b/lib/models/CovidDriveThru/CovidPaymentInfoResponse.dart @@ -4,19 +4,19 @@ class CovidPaymentInfoResponse { dynamic cashPriceTaxField; dynamic cashPriceWithTaxField; dynamic companyIdField; - String companyNameField; + String? companyNameField; dynamic companyShareWithTaxField; dynamic errCodeField; dynamic groupIDField; dynamic insurancePolicyNoField; - String messageField; + String? messageField; dynamic patientCardIDField; dynamic patientShareField; dynamic patientShareWithTaxField; dynamic patientTaxAmountField; dynamic policyIdField; dynamic policyNameField; - String procedureNameField; + String? procedureNameField; dynamic setupIDField; dynamic statusCodeField; dynamic subPolicyNoField; diff --git a/lib/models/CovidDriveThru/CovidTestProceduresResponse.dart b/lib/models/CovidDriveThru/CovidTestProceduresResponse.dart index c104a1fc..2c0a42c9 100644 --- a/lib/models/CovidDriveThru/CovidTestProceduresResponse.dart +++ b/lib/models/CovidDriveThru/CovidTestProceduresResponse.dart @@ -1,9 +1,9 @@ class CovidTestProceduresResponse { - String procedureID; - String procedureName; - String procedureNameN; - int projectID; - String setupID; + String? procedureID; + String? procedureName; + String? procedureNameN; + int? projectID; + String? setupID; CovidTestProceduresResponse( {this.procedureID, diff --git a/lib/models/CovidDriveThru/DriveThroughTestingCenterModel.dart b/lib/models/CovidDriveThru/DriveThroughTestingCenterModel.dart index 8e10af17..f976c9bc 100644 --- a/lib/models/CovidDriveThru/DriveThroughTestingCenterModel.dart +++ b/lib/models/CovidDriveThru/DriveThroughTestingCenterModel.dart @@ -1,16 +1,16 @@ class DriveThroughTestingCenterModel { - int rowID; - int iD; - int projectID; - String setupID; - double longitude; - double latitude; - int numberOfTracks; - bool isActive; - int createdBy; - String createdOn; - num testTypeEnum; - num testProcedureEnum; + int? rowID; + int? iD; + int? projectID; + String? setupID; + double? longitude; + double? latitude; + int? numberOfTracks; + bool? isActive; + int? createdBy; + String? createdOn; + num? testTypeEnum; + num? testProcedureEnum; dynamic editedBy; dynamic editedON; dynamic projectName; diff --git a/lib/models/FamilyFiles/GetAllSharedRecordByStatusResponse.dart b/lib/models/FamilyFiles/GetAllSharedRecordByStatusResponse.dart index 2a74e8f6..def0db59 100644 --- a/lib/models/FamilyFiles/GetAllSharedRecordByStatusResponse.dart +++ b/lib/models/FamilyFiles/GetAllSharedRecordByStatusResponse.dart @@ -1,36 +1,36 @@ class GetAllSharedRecordsByStatusResponse { dynamic date; - int languageID; - int serviceName; + int? languageID; + int? serviceName; dynamic time; dynamic androidLink; dynamic authenticationTokenID; dynamic data; - bool dataw; - int dietType; + bool? dataw; + int? dietType; dynamic errorCode; dynamic errorEndUserMessage; dynamic errorEndUserMessageN; dynamic errorMessage; - int errorType; - int foodCategory; + int? errorType; + int? foodCategory; dynamic iOSLink; - bool isAuthenticated; - int mealOrderStatus; - int mealType; - int messageStatus; - int numberOfResultRecords; + bool? isAuthenticated; + int? mealOrderStatus; + int? mealType; + int? messageStatus; + int? numberOfResultRecords; dynamic patientBlodType; dynamic successMsg; dynamic successMsgN; dynamic doctorInformationList; - List getAllPendingRecordsList; - List getAllSharedRecordsByStatusList = []; - List getResponseFileList; - bool isHMGPatient; - bool isLoginSuccessfully; - bool isNeedUpdateIdintificationNo; - bool kioskSendSMS; + List? getAllPendingRecordsList; + List? getAllSharedRecordsByStatusList ; + List? getResponseFileList; + bool? isHMGPatient; + bool? isLoginSuccessfully; + bool? isNeedUpdateIdintificationNo; + bool? kioskSendSMS; dynamic list; dynamic listAskHabibMobileLoginInfo; dynamic listAskHabibPatientFile; @@ -39,31 +39,31 @@ class GetAllSharedRecordsByStatusResponse { dynamic listPatientCount; dynamic logInTokenID; dynamic mohemmPrivilegeList; - int pateintID; + int? pateintID; dynamic patientBloodType; dynamic patientERDriverFile; dynamic patientERDriverFileList; - bool patientHasFile; + bool? patientHasFile; dynamic patientMergedIDs; - bool patientOutSA; - int patientShareRequestID; - int patientType; - int projectIDOut; + bool? patientOutSA; + int? patientShareRequestID; + int? patientType; + int? projectIDOut; dynamic returnMessage; - bool sMSLoginRequired; + bool? sMSLoginRequired; dynamic servicePrivilegeList; dynamic sharePatientName; dynamic verificationCode; dynamic email; dynamic errorList; - bool hasFile; - bool isActiveCode; - bool isMerged; - bool isNeedUserAgreement; - bool isSMSSent; + bool? hasFile; + bool? isActiveCode; + bool? isMerged; + bool? isNeedUserAgreement; + bool? isSMSSent; dynamic memberList; dynamic message; - int statusCode; + int? statusCode; GetAllSharedRecordsByStatusResponse( {this.date, @@ -162,16 +162,16 @@ class GetAllSharedRecordsByStatusResponse { // getAllPendingRecordsList = json['GetAllPendingRecordsList']; if (json['GetAllPendingRecordsList'] != null) { - getAllSharedRecordsByStatusList = new List(); + getAllSharedRecordsByStatusList = []; json['GetAllPendingRecordsList'].forEach((v) { - getAllSharedRecordsByStatusList.add(new GetAllSharedRecordsByStatusList.fromJson(v)); + getAllSharedRecordsByStatusList!.add(new GetAllSharedRecordsByStatusList.fromJson(v)); }); } if (json['GetAllSharedRecordsByStatusList'] != null) { - getAllSharedRecordsByStatusList = new List(); + getAllSharedRecordsByStatusList = []; json['GetAllSharedRecordsByStatusList'].forEach((v) { - getAllSharedRecordsByStatusList.add(new GetAllSharedRecordsByStatusList.fromJson(v)); + getAllSharedRecordsByStatusList!.add(new GetAllSharedRecordsByStatusList.fromJson(v)); }); } getResponseFileList = json['GetResponseFileList']; @@ -247,7 +247,7 @@ class GetAllSharedRecordsByStatusResponse { data['DoctorInformation_List'] = this.doctorInformationList; data['GetAllPendingRecordsList'] = this.getAllPendingRecordsList; if (this.getAllSharedRecordsByStatusList != null) { - data['GetAllSharedRecordsByStatusList'] = this.getAllSharedRecordsByStatusList.map((v) => v.toJson()).toList(); + data['GetAllSharedRecordsByStatusList'] = this.getAllSharedRecordsByStatusList!.map((v) => v.toJson()).toList(); } data['GetResponseFileList'] = this.getResponseFileList; data['IsHMGPatient'] = this.isHMGPatient; @@ -292,28 +292,28 @@ class GetAllSharedRecordsByStatusResponse { } class GetAllSharedRecordsByStatusList { - int iD; - int patientID; - int responseID; + int? iD; + int? patientID; + int? responseID; dynamic relationshipID; dynamic relationship; dynamic relationshipN; - int regionID; - int status; + int? regionID; + int? status; dynamic isActive; - String editedOn; - String createdOn; - int age; - String emaiLAddress; - int gender; - String genderDescription; - String genderImage; - String mobileNumber; - int patientDataVerified; - String patientIdenficationNumber; - String patientName; - String statusDescription; - int familyRegionID; + String? editedOn; + String? createdOn; + int? age; + String? emaiLAddress; + int? gender; + String? genderDescription; + String? genderImage; + String? mobileNumber; + int? patientDataVerified; + String? patientIdenficationNumber; + String? patientName; + String? statusDescription; + int? familyRegionID; GetAllSharedRecordsByStatusList( {this.iD, diff --git a/lib/models/FamilyFiles/GetAllSharedRecordsByStatusReq.dart b/lib/models/FamilyFiles/GetAllSharedRecordsByStatusReq.dart index ac0adc34..ee00594e 100644 --- a/lib/models/FamilyFiles/GetAllSharedRecordsByStatusReq.dart +++ b/lib/models/FamilyFiles/GetAllSharedRecordsByStatusReq.dart @@ -1,18 +1,18 @@ class GetAllSharedRecordsByStatusReq { - double versionID; - int channel; - int languageID; - String iPAdress; - String generalid; - int patientOutSA; - String sessionID; - bool isDentalAllowedBackend; - int deviceTypeID; - int patientID; - String tokenID; - int patientTypeID; - int patientType; - int status; + double? versionID; + int? channel; + int? languageID; + String? iPAdress; + String? generalid; + int? patientOutSA; + String? sessionID; + bool? isDentalAllowedBackend; + int? deviceTypeID; + int? patientID; + String? tokenID; + int? patientTypeID; + int? patientType; + int? status; GetAllSharedRecordsByStatusReq( {this.versionID, diff --git a/lib/models/FamilyFiles/PatientERVirtualHistoryResponse.dart b/lib/models/FamilyFiles/PatientERVirtualHistoryResponse.dart index 11a8157c..932df25e 100644 --- a/lib/models/FamilyFiles/PatientERVirtualHistoryResponse.dart +++ b/lib/models/FamilyFiles/PatientERVirtualHistoryResponse.dart @@ -1,13 +1,13 @@ class PatientERVirtualHistoryResponse { - List erRequestHistoryList; + List? erRequestHistoryList; PatientERVirtualHistoryResponse({this.erRequestHistoryList}); PatientERVirtualHistoryResponse.fromJson(Map json) { if (json['ErRequestHistoryList'] != null) { - erRequestHistoryList = new List(); + erRequestHistoryList = []; json['ErRequestHistoryList'].forEach((v) { - erRequestHistoryList.add(new ErRequestHistoryList.fromJson(v)); + erRequestHistoryList!.add(new ErRequestHistoryList.fromJson(v)); }); } } @@ -16,7 +16,7 @@ class PatientERVirtualHistoryResponse { final Map data = new Map(); if (this.erRequestHistoryList != null) { data['ErRequestHistoryList'] = - this.erRequestHistoryList.map((v) => v.toJson()).toList(); + this.erRequestHistoryList!.map((v) => v.toJson()).toList(); } return data; } @@ -24,23 +24,23 @@ class PatientERVirtualHistoryResponse { class ErRequestHistoryList { dynamic appointmentNo; - String arrivalTime; - int callDuration; - int callStatus; - String clientRequestID; - String doctorID; - String doctorName; - String doctorNameN; - String doctorTitle; - String exWaitingTime; - bool isAppointmentHaveRating; - int patCount; - int projectID; - String sArrivalTime; - int serviceID; - String stringCallStatus; - int vCID; - int watingtimeInteger; + String? arrivalTime; + int? callDuration; + int? callStatus; + String? clientRequestID; + String? doctorID; + String? doctorName; + String? doctorNameN; + String? doctorTitle; + String? exWaitingTime; + bool? isAppointmentHaveRating; + int? patCount; + int? projectID; + String? sArrivalTime; + int? serviceID; + String? stringCallStatus; + int? vCID; + int? watingtimeInteger; ErRequestHistoryList( {this.appointmentNo, diff --git a/lib/models/LiveCare/ApplePayInsertRequest.dart b/lib/models/LiveCare/ApplePayInsertRequest.dart index 2e091f65..1b247a7c 100644 --- a/lib/models/LiveCare/ApplePayInsertRequest.dart +++ b/lib/models/LiveCare/ApplePayInsertRequest.dart @@ -1,78 +1,78 @@ class ApplePayInsertRequest { - String clientRequestID; - int clinicID; - String currency; - String customerEmail; + String? clientRequestID; + int? clinicID; + String? currency; + String? customerEmail; dynamic customerID; - String customerName; - String deviceToken; - String voipToken; - int doctorID; - String projectID; - String serviceID; - int channelID; + String? customerName; + String? deviceToken; + String? voipToken; + int? doctorID; + String? projectID; + String? serviceID; + int? channelID; dynamic patientID; - int patientTypeID; - int patientOutSA; + int? patientTypeID; + int? patientOutSA; dynamic appointmentDate; - int appointmentNo; - String orderDescription; - String liveServiceID; - String latitude; - String longitude; - String amount; - String isSchedule; - String language; - int userName; - String responseContinueURL; - String backClickUrl; - String paymentOption; - double versionID; - int channel; - int languageID; - String iPAdress; - String generalid; - String sessionID; - bool isDentalAllowedBackend; - int deviceTypeID; + int? appointmentNo; + String? orderDescription; + String? liveServiceID; + String? latitude; + String? longitude; + String? amount; + String? isSchedule; + String? language; + int? userName; + String? responseContinueURL; + String? backClickUrl; + String? paymentOption; + double? versionID; + int? channel; + int? languageID; + String? iPAdress; + String? generalid; + String? sessionID; + bool? isDentalAllowedBackend; + int? deviceTypeID; ApplePayInsertRequest( {this.clientRequestID, - this.clinicID, - this.currency, - this.customerEmail, - this.customerID, - this.customerName, - this.deviceToken, - this.voipToken, - this.doctorID, - this.projectID, - this.serviceID, - this.channelID, - this.patientID, - this.patientTypeID, - this.patientOutSA, - this.appointmentDate, - this.appointmentNo, - this.orderDescription, - this.liveServiceID, - this.latitude, - this.longitude, - this.amount, - this.isSchedule, - this.language, - this.userName, - this.responseContinueURL, - this.backClickUrl, - this.paymentOption, - this.versionID, - this.channel, - this.languageID, - this.iPAdress, - this.generalid, - this.sessionID, - this.isDentalAllowedBackend, - this.deviceTypeID}); + this.clinicID, + this.currency, + this.customerEmail, + this.customerID, + this.customerName, + this.deviceToken, + this.voipToken, + this.doctorID, + this.projectID, + this.serviceID, + this.channelID, + this.patientID, + this.patientTypeID, + this.patientOutSA, + this.appointmentDate, + this.appointmentNo, + this.orderDescription, + this.liveServiceID, + this.latitude, + this.longitude, + this.amount, + this.isSchedule, + this.language, + this.userName, + this.responseContinueURL, + this.backClickUrl, + this.paymentOption, + this.versionID, + this.channel, + this.languageID, + this.iPAdress, + this.generalid, + this.sessionID, + this.isDentalAllowedBackend, + this.deviceTypeID}); ApplePayInsertRequest.fromJson(Map json) { clientRequestID = json['ClientRequestID']; diff --git a/lib/models/LiveCare/ClinicsServiceTimingsResponse.dart b/lib/models/LiveCare/ClinicsServiceTimingsResponse.dart index 223b633f..0298f1c4 100644 --- a/lib/models/LiveCare/ClinicsServiceTimingsResponse.dart +++ b/lib/models/LiveCare/ClinicsServiceTimingsResponse.dart @@ -1,16 +1,13 @@ class ClinicsServiceTimingsResponse { - List - patientERGetClinicsServiceTimingsList; + List? patientERGetClinicsServiceTimingsList; ClinicsServiceTimingsResponse({this.patientERGetClinicsServiceTimingsList}); ClinicsServiceTimingsResponse.fromJson(Map json) { if (json['PatientER_GetClinicsServiceTimingsList'] != null) { - patientERGetClinicsServiceTimingsList = - new List(); + patientERGetClinicsServiceTimingsList = []; json['PatientER_GetClinicsServiceTimingsList'].forEach((v) { - patientERGetClinicsServiceTimingsList - .add(new PatientERGetClinicsServiceTimingsList.fromJson(v)); + patientERGetClinicsServiceTimingsList!.add(new PatientERGetClinicsServiceTimingsList.fromJson(v)); }); } } @@ -18,10 +15,7 @@ class ClinicsServiceTimingsResponse { Map toJson() { final Map data = new Map(); if (this.patientERGetClinicsServiceTimingsList != null) { - data['PatientER_GetClinicsServiceTimingsList'] = this - .patientERGetClinicsServiceTimingsList - .map((v) => v.toJson()) - .toList(); + data['PatientER_GetClinicsServiceTimingsList'] = this.patientERGetClinicsServiceTimingsList.map((v) => v.toJson()).toList(); } return data; } @@ -44,18 +38,18 @@ class PatientERGetClinicsServiceTimingsList { PatientERGetClinicsServiceTimingsList( {this.iD, - this.serviceID, - this.shiftID, - this.dayOfWeek, - this.dayOfWeekStr, - this.startTime, - this.endTime, - this.isActive, - this.createdOn, - this.createdBy, - this.projectOutSA, - this.dayOfWeekStrN, - this.shiftTimings}); + this.serviceID, + this.shiftID, + this.dayOfWeek, + this.dayOfWeekStr, + this.startTime, + this.endTime, + this.isActive, + this.createdOn, + this.createdBy, + this.projectOutSA, + this.dayOfWeekStrN, + this.shiftTimings}); PatientERGetClinicsServiceTimingsList.fromJson(Map json) { iD = json['ID']; diff --git a/lib/models/ambulanceRequest/locationDetails.dart b/lib/models/ambulanceRequest/locationDetails.dart index 2ad61f2d..6ed86ca3 100644 --- a/lib/models/ambulanceRequest/locationDetails.dart +++ b/lib/models/ambulanceRequest/locationDetails.dart @@ -1,21 +1,21 @@ class LocationDetails { - double _lat; - double _long; - String _formattedAddress; + double? _lat; + double? _long; + String? _formattedAddress; - double get lat => _lat; + double get lat => _lat!; set lat(double lat) { _lat = lat; } - double get long => _long; + double get long => _long!; set long(double long) { _long = long; } - String get formattedAddress => _formattedAddress; + String get formattedAddress => _formattedAddress!; set formattedAddress(String formattedAddress) { _formattedAddress = formattedAddress; diff --git a/lib/models/anicllary-orders/ancillary_order_list_model.dart b/lib/models/anicllary-orders/ancillary_order_list_model.dart index 56cfeb31..9aefe844 100644 --- a/lib/models/anicllary-orders/ancillary_order_list_model.dart +++ b/lib/models/anicllary-orders/ancillary_order_list_model.dart @@ -1,14 +1,14 @@ class AncillaryOrdersListModel { - List ancillaryOrderList; + List? ancillaryOrderList; dynamic errCode; - String message; - int patientID; - String patientName; - int patientType; - int projectID; - String projectName; - String setupID; - int statusCode; + String? message; + int? patientID; + String? patientName; + int? patientType; + int? projectID; + String? projectName; + String? setupID; + int? statusCode; AncillaryOrdersListModel( {this.ancillaryOrderList, @@ -24,9 +24,9 @@ class AncillaryOrdersListModel { AncillaryOrdersListModel.fromJson(Map json) { if (json['AncillaryOrderList'] != null) { - ancillaryOrderList = new List(); + ancillaryOrderList =[]; json['AncillaryOrderList'].forEach((v) { - ancillaryOrderList.add(new AncillaryOrderList.fromJson(v)); + ancillaryOrderList!.add(new AncillaryOrderList.fromJson(v)); }); } errCode = json['ErrCode']; @@ -44,7 +44,7 @@ class AncillaryOrdersListModel { final Map data = new Map(); if (this.ancillaryOrderList != null) { data['AncillaryOrderList'] = - this.ancillaryOrderList.map((v) => v.toJson()).toList(); + this.ancillaryOrderList!.map((v) => v.toJson()).toList(); } data['ErrCode'] = this.errCode; data['Message'] = this.message; @@ -60,14 +60,14 @@ class AncillaryOrdersListModel { } class AncillaryOrderList { - String appointmentDate; - int appointmentNo; - int clinicID; - String clinicName; - int doctorID; - String doctorName; - String orderDate; - int orderNo; + String? appointmentDate; + int? appointmentNo; + int? clinicID; + String? clinicName; + int? doctorID; + String? doctorName; + String? orderDate; + int? orderNo; AncillaryOrderList( {this.appointmentDate, diff --git a/lib/models/anicllary-orders/ancillary_order_proc_model.dart b/lib/models/anicllary-orders/ancillary_order_proc_model.dart index 5524f58a..dc1941fd 100644 --- a/lib/models/anicllary-orders/ancillary_order_proc_model.dart +++ b/lib/models/anicllary-orders/ancillary_order_proc_model.dart @@ -1,28 +1,28 @@ class AncillaryOrdersListProcListModel { - List ancillaryOrderProcDetailsList; - String appointmentDate; - int appointmentNo; - int clinicID; - String clinicName; - int companyID; - String companyName; - int doctorID; - String doctorName; + List? ancillaryOrderProcDetailsList; + String? appointmentDate; + int? appointmentNo; + int? clinicID; + String? clinicName; + int? companyID; + String? companyName; + int? doctorID; + String? doctorName; Null errCode; - int groupID; - String insurancePolicyNo; - String message; - String patientCardID; - int patientID; - String patientName; - int patientType; - int policyID; - String policyName; - int projectID; - String setupID; - int statusCode; - int subCategoryID; - String subPolicyNo; + int? groupID; + String? insurancePolicyNo; + String? message; + String? patientCardID; + int? patientID; + String? patientName; + int? patientType; + int? policyID; + String? policyName; + int? projectID; + String? setupID; + int? statusCode; + int? subCategoryID; + String? subPolicyNo; AncillaryOrdersListProcListModel( {this.ancillaryOrderProcDetailsList, @@ -52,9 +52,9 @@ class AncillaryOrdersListProcListModel { AncillaryOrdersListProcListModel.fromJson(Map json) { if (json['AncillaryOrderProcDetailsList'] != null) { - ancillaryOrderProcDetailsList = new List(); + ancillaryOrderProcDetailsList = []; json['AncillaryOrderProcDetailsList'].forEach((v) { - ancillaryOrderProcDetailsList + ancillaryOrderProcDetailsList! .add(new AncillaryOrderProcDetailsList.fromJson(v)); }); } @@ -87,7 +87,7 @@ class AncillaryOrdersListProcListModel { final Map data = new Map(); if (this.ancillaryOrderProcDetailsList != null) { data['AncillaryOrderProcDetailsList'] = - this.ancillaryOrderProcDetailsList.map((v) => v.toJson()).toList(); + this.ancillaryOrderProcDetailsList!.map((v) => v.toJson()).toList(); } data['AppointmentDate'] = this.appointmentDate; data['AppointmentNo'] = this.appointmentNo; @@ -119,32 +119,32 @@ class AncillaryOrdersListProcListModel { class AncillaryOrderProcDetailsList { dynamic approvalLineItemNo; dynamic approvalNo; - String approvalStatus; + String? approvalStatus; dynamic approvalStatusID; dynamic companyShare; dynamic companyShareWithTax; dynamic companyTaxAmount; dynamic discountAmount; dynamic discountCategory; - String discountType; + String? discountType; dynamic discountTypeValue; - bool isApprovalCreated; - bool isApprovalRequired; - bool isCovered; - String orderDate; + bool? isApprovalCreated; + bool? isApprovalRequired; + bool? isCovered; + String? orderDate; dynamic orderLineItemNo; dynamic orderNo; dynamic partnerID; dynamic partnerShare; - String partnerShareType; + String? partnerShareType; dynamic patientShare; dynamic patientShareWithTax; dynamic patientTaxAmount; dynamic procPrice; dynamic procedureCategoryID; - String procedureCategoryName; - String procedureID; - String procedureName; + String? procedureCategoryName; + String? procedureID; + String? procedureName; dynamic taxAmount; dynamic taxPct; diff --git a/lib/models/anicllary-orders/ancillary_orders_proc_list.dart b/lib/models/anicllary-orders/ancillary_orders_proc_list.dart index ed22bd05..57a9f3bb 100644 --- a/lib/models/anicllary-orders/ancillary_orders_proc_list.dart +++ b/lib/models/anicllary-orders/ancillary_orders_proc_list.dart @@ -1,6 +1,6 @@ class AncillaryOrdersProcedureList { - int procedureID; - String procedureDescription; + int? procedureID; + String? procedureDescription; AncillaryOrdersProcedureList({this.procedureID, this.procedureDescription}); diff --git a/lib/models/insurance/getInsuranceCompaniesModel.dart b/lib/models/insurance/getInsuranceCompaniesModel.dart index b5d07e76..2aaef58e 100644 --- a/lib/models/insurance/getInsuranceCompaniesModel.dart +++ b/lib/models/insurance/getInsuranceCompaniesModel.dart @@ -1,17 +1,17 @@ class InsuranceCompaniesGetModel { - String setupID; - int projectID; - int companyID; - String companyName; - String companyNameN; - String alias; - String aliasN; - String insurancePolicyNo; - String phoneOffice1; - String phoneOffice2; - String faxNumber; - int status; - String contractExpiry; + String? setupID; + int? projectID; + int? companyID; + String? companyName; + String? companyNameN; + String? alias; + String? aliasN; + String? insurancePolicyNo; + String? phoneOffice1; + String? phoneOffice2; + String? faxNumber; + int? status; + String? contractExpiry; InsuranceCompaniesGetModel( {this.setupID, diff --git a/lib/models/insurance/insuranceCompaniesSchemeModel.dart b/lib/models/insurance/insuranceCompaniesSchemeModel.dart index ed5ce65e..a8ad8b3a 100644 --- a/lib/models/insurance/insuranceCompaniesSchemeModel.dart +++ b/lib/models/insurance/insuranceCompaniesSchemeModel.dart @@ -1,36 +1,36 @@ class InsuranceCompaniesSchemeModel { - String setupID; - int projectID; - int companyID; - int subCategoryID; - String subCategoryDesc; - String subCategoryDescN; - String validFrom; - String validTo; + String? setupID; + int? projectID; + int? companyID; + int? subCategoryID; + String? subCategoryDesc; + String? subCategoryDescN; + String? validFrom; + String? validTo; var isInpatient; - int roomCategory; - bool isActive; - int createdBy; - String createdOn; - int editedBy; - String editedOn; + int? roomCategory; + bool? isActive; + int? createdBy; + String? createdOn; + int? editedBy; + String? editedOn; InsuranceCompaniesSchemeModel( {this.setupID, - this.projectID, - this.companyID, - this.subCategoryID, - this.subCategoryDesc, - this.subCategoryDescN, - this.validFrom, - this.validTo, - this.isInpatient, - this.roomCategory, - this.isActive, - this.createdBy, - this.createdOn, - this.editedBy, - this.editedOn}); + this.projectID, + this.companyID, + this.subCategoryID, + this.subCategoryDesc, + this.subCategoryDescN, + this.validFrom, + this.validTo, + this.isInpatient, + this.roomCategory, + this.isActive, + this.createdBy, + this.createdOn, + this.editedBy, + this.editedOn}); InsuranceCompaniesSchemeModel.fromJson(Map json) { setupID = json['SetupID'];