From cb56750e6b388204ac85421f2567ea7cfabd3e03 Mon Sep 17 00:00:00 2001 From: devamirsaleemahmad Date: Thu, 19 Oct 2023 12:19:40 +0300 Subject: [PATCH] models updates -> 3.13.6 --- lib/core/model/ImagesInfo.dart | 6 +- lib/core/model/ResponseModel.dart | 6 +- lib/core/model/pharmacy/brands_model.dart | 6 +- .../pharmacy/categorise_parent_model.dart | 24 +- .../model/pharmacy/final_products_model.dart | 56 ++--- .../model/pharmacy/offer_products_model.dart | 186 +++++++-------- lib/core/model/pharmacy/offers_model.dart | 68 +++--- .../model/pharmacy/parent_products_model.dart | 108 ++++----- .../model/pharmacy/pharmacy_categorise.dart | 28 +-- lib/core/model/pharmacy/scan_qr_model.dart | 224 ++++++++---------- .../model/pharmacy/sub_categories_model.dart | 26 +- .../model/pharmacy/sub_products_model.dart | 168 ++++++------- .../model/prescriptions/Prescriptions.dart | 76 +++--- .../prescriptions/perscription_pharmacy.dart | 36 +-- .../prescription_info_rc_model.dart | 14 +- .../prescriptions/prescription_report.dart | 86 +++---- .../prescription_report_enh.dart | 54 ++--- .../prescription_report_inp.dart | 54 ++--- .../prescriptions/prescriptions_order.dart | 36 +-- ...t_get_list_pharmacy_for_prescriptions.dart | 20 +- .../request_prescription_report.dart | 74 +++--- .../request_prescription_report_enh.dart | 38 +-- .../prescriptions/request_prescriptions.dart | 26 +- .../request_prescriptions_orders.dart | 20 +- .../request_send_prescription_email.dart | 53 ++--- lib/core/model/privilege/PrivilegeModel.dart | 6 +- .../privilege/VidaPlusProjectListModel.dart | 2 +- lib/core/model/qr/qr_parking_model.dart | 144 +++++------ lib/core/model/radiology/final_radiology.dart | 94 ++++---- .../request_patient_rad_orders_details.dart | 78 +++--- .../request_send_rad_report_email.dart | 108 ++++----- lib/core/model/rate/appointment_details.dart | 12 +- lib/core/model/rate/appointment_rate.dart | 44 ++-- lib/core/model/rate/appoitment_rated.dart | 68 +++--- lib/core/model/reports/Reports.dart | 52 ++-- .../reports/admission_for_medical_report.dart | 102 ++++---- .../model/reports/request_report_history.dart | 32 +-- lib/core/model/reports/request_reports.dart | 34 +-- lib/core/model/search_products_model.dart | 62 +++-- .../admission_status_for_sick_leave.dart | 24 +- lib/core/model/sick_leave/sick_leave.dart | 66 +++--- lib/core/model/vaccine/my_vaccine.dart | 130 +++++----- lib/core/model/vaccine/vaccination_item.dart | 4 +- .../model/vaccine/vaccination_on_hand.dart | 16 +- .../vital_sign/vital_sign_req_model.dart | 28 +-- .../vital_sign/vital_sign_res_model.dart | 6 +- lib/core/model/weahter/weather_model.dart | 80 +++---- .../AlHabibMedicalService/H2O_service.dart | 6 +- .../AlHabibMedicalService/cmc_service.dart | 18 +- .../customer_addresses_service.dart | 34 +-- .../e_referral_service.dart | 16 +- .../health-calculator/bariatrics-service.dart | 8 +- .../home_health_care_service.dart | 22 +- lib/core/service/AuthenticatedUserObject.dart | 2 +- .../service/PrescriptionDeliveryService.dart | 4 +- .../service/ancillary_orders_service.dart | 4 +- .../service/appointment_rate_service.dart | 16 +- lib/core/service/base_service.dart | 4 +- .../service/blood/blood_details_servies.dart | 4 +- .../service/blood/blood_donation_service.dart | 4 +- .../childvaccines/add_new_child_service.dart | 10 +- .../childvaccines/child_vaccines_service.dart | 4 +- .../childvaccines/delete_baby_service.dart | 12 +- .../get_vaccinations_item_services.dart | 2 +- .../user_information_service.dart | 2 +- .../vaccination_table_service.dart | 4 +- lib/core/service/client/base_app_client.dart | 202 ++++++++-------- .../service/contactus/finadus_service.dart | 6 +- .../service/contactus/livechat_service.dart | 2 +- lib/core/service/er/EdOnlineServices.dart | 16 +- lib/core/service/er/am_service.dart | 22 +- lib/core/service/er/er_service.dart | 4 +- .../service/feedback/feedback_service.dart | 6 +- .../geofencing/GeofencingServices.dart | 6 +- lib/core/service/hospital_service.dart | 13 +- lib/core/service/insurance_service.dart | 16 +- .../medical/ActiveMedicationsService.dart | 2 +- .../service/medical/AllergiesService.dart | 2 +- .../service/medical/BloodPressureService.dart | 32 +-- .../service/medical/BloodSugarService.dart | 24 +- lib/core/service/medical/EyeService.dart | 38 ++- .../medical/PatientSickLeaveService.dart | 12 +- .../medical/WeightPressureService.dart | 18 +- .../service/medical/ask_doctor_services.dart | 16 +- lib/core/service/medical/labs_service.dart | 32 +-- lib/core/service/medical/medical_service.dart | 6 +- .../service/medical/my_balance_service.dart | 26 +- .../service/medical/my_doctor_service.dart | 16 +- .../medical/prescriptions_service.dart | 32 +-- .../service/medical/radiology_service.dart | 14 +- .../medical/reports_monthly_service.dart | 4 +- lib/core/service/medical/reports_service.dart | 4 +- .../service/medical/vital_sign_service.dart | 4 +- lib/core/service/notifications_service.dart | 2 +- lib/core/service/offers_service.dart | 6 +- .../PackagesOffersServices.dart | 115 +++++---- .../lacum-registration-service.dart | 2 +- .../service/parmacyModule/lacum-service.dart | 12 +- .../parmacyModule/lacum-transfer-service.dart | 17 +- .../parmacyModule/order-preview-service.dart | 34 +-- .../parmacyModule/parmacy_module_service.dart | 14 +- .../parmacyModule/prescription_service.dart | 2 +- .../terms-condition-service.dart | 2 +- lib/core/service/pharmacies_service.dart | 10 +- .../service/pharmacy_categorise_service.dart | 40 ++-- lib/core/service/privilege_service.dart | 4 +- lib/core/service/qr_service.dart | 2 +- lib/core/service/vaccine_service.dart | 8 +- lib/core/service/weather_service.dart | 2 +- .../AlHabibMedicalService/H2O_view_model.dart | 30 +-- .../add_new_address_Request_Model.dart | 46 ++-- .../AlHabibMedicalService/cmc_view_model.dart | 34 +-- .../Bariatrics-viewmodel.dart | 12 +- .../home_health_care_view_model.dart | 28 +-- .../e_referral_view_model.dart | 12 +- .../blood_details_view_model.dart | 2 +- .../booddonation_view_model.dart | 2 +- .../add_new_child_view_model.dart | 6 +- .../child_vaccines_view_model.dart | 10 +- .../user_information_view_model.dart | 2 +- .../vaccination_table_view_model.dart | 2 +- .../contactus/findus_view_model.dart | 2 +- .../contactus/livechat_view_model.dart | 2 +- lib/core/viewModels/er/EdOnlineViewModel.dart | 55 ++--- .../viewModels/er/am_request_view_model.dart | 28 +-- .../er/near_hospital_view_model.dart | 4 +- lib/core/viewModels/er/rrt-view-model.dart | 24 +- .../feedback/feedback_view_model.dart | 10 +- lib/core/viewModels/medical/EyeViewModel.dart | 2 +- .../medical/ask_doctor_view_model.dart | 2 +- .../viewModels/medical/labs_view_model.dart | 6 +- .../medical/my_doctor_view_model.dart | 4 +- .../medical/prescriptions_view_model.dart | 4 +- .../medical/radiology_view_model.dart | 4 +- .../medical/reports_view_model.dart | 12 +- .../pharmacyModule/OrderPreviewViewModel.dart | 2 +- .../pharmacy_module_view_model.dart | 2 +- .../product_detail_view_model.dart | 2 +- .../pharmacy_categorise_view_model.dart | 4 +- lib/core/viewModels/project_view_model.dart | 8 +- .../AppoimentAllHistoryResultList.dart | 2 +- .../Appointments/DoctorListResponse.dart | 2 +- .../h2o/h20_setting.dart | 4 +- .../bmi_calculator/bariatrics-screen.dart | 4 +- .../bmi_calculator/bmi_calculator.dart | 4 +- .../bmi_calculator/result_page.dart | 2 +- .../bmr_calculator/bmr_calculator.dart | 4 +- .../bmr_calculator/bmr_result_page.dart | 2 +- .../health_calculator/body_fat/body_fat.dart | 8 +- .../body_fat/body_fat_result_page.dart | 2 +- .../calorie_calculator.dart | 4 +- .../calorie_result_page.dart | 2 +- .../carbs/carbs_result_page.dart | 2 +- .../delivery_due_result_page.dart | 2 +- .../ideal_body/ideal_body.dart | 4 +- .../ideal_body/ideal_body_result_page.dart | 2 +- .../ovulation_result_page.dart | 2 +- .../health_converter.dart | 2 +- .../​ health_calculators.dart | 4 +- lib/pages/Blood/blood_donation.dart | 2 +- .../BookAppointment/DentalComplaints.dart | 2 +- lib/pages/BookAppointment/DoctorProfile.dart | 2 +- .../components/LaserClinic.dart | 2 +- .../components/SearchByClinic.dart | 2 +- .../components/SearchByDoctor.dart | 2 +- .../widgets/DentalComplaintCard.dart | 2 +- .../ChildVaccines/add_newchild_page.dart | 2 +- .../ContactUs/LiveChat/livechat_page.dart | 2 +- lib/pages/ContactUs/contact_us_page.dart | 2 +- .../covid-drivethru-location.dart | 2 +- lib/pages/DrawerPages/family/my-family.dart | 2 +- lib/pages/ErService/AmbulanceReq.dart | 2 +- .../ErService/EdOnline/DdServicesPage.dart | 2 +- lib/pages/ErService/NearestEr.dart | 2 +- .../rapid-response-team/rrt-main-screen.dart | 2 +- .../MyAppointments/AppointmentDetails.dart | 2 +- lib/pages/MyAppointments/MyAppointments.dart | 14 +- lib/pages/ToDoList/ToDo.dart | 2 +- .../insurance/insurance_approval_screen.dart | 2 +- .../insurance/insurance_card_screen.dart | 2 +- .../insurance/insurance_update_screen.dart | 2 +- lib/pages/livecare/livecare_home.dart | 4 +- lib/pages/livecare/widgets/clinic_list.dart | 6 +- .../active_medications/reminder_page.dart | 2 +- lib/pages/medical/allergies_page.dart | 2 +- .../medical/balance/advance_payment_page.dart | 2 +- .../medical/balance/my_balance_page.dart | 2 +- .../medical/doctor/doctor_home_page.dart | 2 +- lib/pages/medical/eye/EyeHomePage.dart | 2 +- lib/pages/medical/labs/labs_home_page.dart | 2 +- .../medical/medical_profile_page_new.dart | 2 +- .../my_invoices/invoice_detail_page.dart | 2 +- .../medical/my_invoices/my_invoice_page.dart | 2 +- .../widget/CurvedChartBloodPressure.dart | 8 +- .../my_trackers/widget/LineChartCurved.dart | 6 +- .../widget/MonthCurvedChartBloodPressure.dart | 8 +- .../widget/MonthLineChartCurved.dart | 6 +- .../medical/patient_sick_leave_page.dart | 2 +- .../prescriptions_home_page.dart | 2 +- .../radiology/radiology_home_page.dart | 2 +- .../medical/reports/monthly_reports.dart | 2 +- .../medical/reports/report_home_page.dart | 2 +- .../distance/distanceTracker.dart | 6 +- .../health_data_list.dart | 2 +- .../heartrate/heartrateTracker.dart | 6 +- .../steps/stepsTracker.dart | 6 +- .../syncHealthData.dart | 8 +- .../medical/vital_sign/LineChartCurved.dart | 6 +- .../LineChartCurvedBloodPressure.dart | 8 +- .../vital_sign/vital_sign_details_screen.dart | 2 +- lib/pages/parent_categorise_page.dart | 4 +- lib/pages/paymentService/payment_service.dart | 2 +- .../screens/lacum-registration-page.dart | 2 +- lib/pages/sub_categorise_page.dart | 4 +- .../pharmacy_services/brands_service.dart | 6 +- .../cancelOrder_service.dart | 2 +- .../orderDetails_service.dart | 2 +- .../pharmacy_services/order_service.dart | 2 +- .../pharmacyAddress_service.dart | 2 +- .../product_detail_service.dart | 10 +- .../recommendedProduct_service.dart | 4 +- .../pharmacy_services/review_service.dart | 2 +- .../pharmacy_services/wishList_service.dart | 2 +- .../writeReview_service.dart | 2 +- lib/uitl/CalendarUtils.dart | 2 +- lib/uitl/HMG_Geofence.dart | 4 +- lib/uitl/utils.dart | 4 +- 227 files changed, 2143 insertions(+), 2210 deletions(-) diff --git a/lib/core/model/ImagesInfo.dart b/lib/core/model/ImagesInfo.dart index 54e8042b..5455d1bb 100644 --- a/lib/core/model/ImagesInfo.dart +++ b/lib/core/model/ImagesInfo.dart @@ -1,7 +1,7 @@ class ImagesInfo { - final String imageAr; - final String imageEn; - final bool isAsset; + final String? imageAr; + final String? imageEn; + final bool? isAsset; ImagesInfo({this.imageAr, this.imageEn, this.isAsset = false}); } diff --git a/lib/core/model/ResponseModel.dart b/lib/core/model/ResponseModel.dart index f34abf7d..41f28412 100644 --- a/lib/core/model/ResponseModel.dart +++ b/lib/core/model/ResponseModel.dart @@ -1,7 +1,7 @@ class ResponseModel{ - final bool status; - final String error; - final T data; + final bool? status; + final String? error; + final T? data; ResponseModel({this.status, this.data, this.error}); } \ No newline at end of file diff --git a/lib/core/model/pharmacy/brands_model.dart b/lib/core/model/pharmacy/brands_model.dart index 03cd689e..0e9d7c7d 100644 --- a/lib/core/model/pharmacy/brands_model.dart +++ b/lib/core/model/pharmacy/brands_model.dart @@ -1,7 +1,7 @@ class BrandsModel { - String id; - String name; - String namen; + String? id; + String? name; + String? namen; Null image; BrandsModel({this.id, this.name, this.namen, this.image}); diff --git a/lib/core/model/pharmacy/categorise_parent_model.dart b/lib/core/model/pharmacy/categorise_parent_model.dart index 82c5b55f..de67df68 100644 --- a/lib/core/model/pharmacy/categorise_parent_model.dart +++ b/lib/core/model/pharmacy/categorise_parent_model.dart @@ -1,13 +1,13 @@ class CategoriseParentModel { - String id; - String name; - String namen; - List localizedNames; + String? id; + String? name; + String? namen; + List? localizedNames; dynamic description; - int parentCategoryId; - int displayOrder; + int? parentCategoryId; + int? displayOrder; dynamic image; - bool isLeaf; + bool? isLeaf; CategoriseParentModel( {this.id, @@ -25,9 +25,9 @@ class CategoriseParentModel { name = json['name']; namen = json['namen']; if (json['localized_names'] != null) { - localizedNames = new List(); + localizedNames = []; json['localized_names'].forEach((v) { - localizedNames.add(new LocalizedNames.fromJson(v)); + localizedNames!.add(new LocalizedNames.fromJson(v)); }); } description = json['description']; @@ -44,7 +44,7 @@ class CategoriseParentModel { data['namen'] = this.namen; if (this.localizedNames != null) { data['localized_names'] = - this.localizedNames.map((v) => v.toJson()).toList(); + this.localizedNames!.map((v) => v.toJson()).toList(); } data['description'] = this.description; data['parent_category_id'] = this.parentCategoryId; @@ -56,8 +56,8 @@ class CategoriseParentModel { } class LocalizedNames { - int languageId; - String localizedName; + int? languageId; + String? localizedName; LocalizedNames({this.languageId, this.localizedName}); diff --git a/lib/core/model/pharmacy/final_products_model.dart b/lib/core/model/pharmacy/final_products_model.dart index 52ab1d2d..d2d0ccae 100644 --- a/lib/core/model/pharmacy/final_products_model.dart +++ b/lib/core/model/pharmacy/final_products_model.dart @@ -1,21 +1,21 @@ class FinalProductsModel { - String id; - String name; - String namen; - List localizedNames; - String shortDescription; - String fullDescription; - String fullDescriptionn; + String? id; + String? name; + String? namen; + List? localizedNames; + String? shortDescription; + String? fullDescription; + String? fullDescriptionn; dynamic approvedRatingSum; dynamic approvedTotalReviews; - String sku; - bool isRx; + String? sku; + bool? isRx; dynamic rxMessage; dynamic rxMessagen; dynamic stockQuantity; - String stockAvailability; - String stockAvailabilityn; - bool allowBackInStockSubscriptions; + String? stockAvailability; + String? stockAvailabilityn; + bool? allowBackInStockSubscriptions; dynamic orderMinimumQuantity; dynamic orderMaximumQuantity; dynamic price; @@ -24,9 +24,9 @@ class FinalProductsModel { dynamic discountNamen; dynamic discountPercentage; dynamic displayOrder; - List discountIds; - List reviews; - List images; + List? discountIds; + List? reviews; + List? images; FinalProductsModel( {this.id, @@ -62,16 +62,16 @@ class FinalProductsModel { id = json['id']; name = json['name']; if (json['images'] != null) { - images = new List(); + images = []; json['images'].forEach((v) { - images.add(new Images.fromJson(v)); + images!.add(new Images.fromJson(v)); }); } namen = json['namen']; if (json['localized_names'] != null) { - localizedNames = new List(); + localizedNames = []; json['localized_names'].forEach((v) { - localizedNames.add(new LocalizedNames.fromJson(v)); + localizedNames!.add(new LocalizedNames.fromJson(v)); }); } shortDescription = json['short_description']; @@ -104,7 +104,7 @@ class FinalProductsModel { data['namen'] = this.namen; if (this.localizedNames != null) { data['localized_names'] = - this.localizedNames.map((v) => v.toJson()).toList(); + this.localizedNames!.map((v) => v.toJson()).toList(); } data['short_description'] = this.shortDescription; data['full_description'] = this.fullDescription; @@ -130,15 +130,15 @@ class FinalProductsModel { data['display_order'] = this.displayOrder; if (this.images != null) { - data['images'] = this.images.map((v) => v.toJson()).toList(); + data['images'] = this.images!.map((v) => v.toJson()).toList(); } return data; } } class LocalizedNames { - int languageId; - String localizedName; + int? languageId; + String? localizedName; LocalizedNames({this.languageId, this.localizedName}); @@ -156,11 +156,11 @@ class LocalizedNames { } class Images { - int id; - int position; - String src; - String thumb; - String attachment; + int? id; + int? position; + String? src; + String? thumb; + String? attachment; Images({this.id, this.position, this.src, this.thumb, this.attachment}); diff --git a/lib/core/model/pharmacy/offer_products_model.dart b/lib/core/model/pharmacy/offer_products_model.dart index f41b731b..52520e39 100644 --- a/lib/core/model/pharmacy/offer_products_model.dart +++ b/lib/core/model/pharmacy/offer_products_model.dart @@ -1,90 +1,90 @@ class OfferProductsModel { - String id; - bool visibleIndividually; - String name; - String namen; - List localizedNames; - String shortDescription; - String shortDescriptionn; - String fullDescription; - String fullDescriptionn; - bool markasNew; - bool showOnHomePage; + String? id; + bool? visibleIndividually; + String? name; + String? namen; + List? localizedNames; + String? shortDescription; + String? shortDescriptionn; + String? fullDescription; + String? fullDescriptionn; + bool? markasNew; + bool? showOnHomePage; dynamic metaKeywords; dynamic metaDescription; dynamic metaTitle; - bool allowCustomerReviews; + bool? allowCustomerReviews; dynamic approvedRatingSum; dynamic notApprovedRatingSum; dynamic approvedTotalReviews; dynamic notApprovedTotalReviews; - String sku; - bool isRx; - bool prescriptionRequired; + String? sku; + bool? isRx; + bool? prescriptionRequired; dynamic rxMessage; dynamic rxMessagen; dynamic manufacturerPartNumber; dynamic gtin; - bool isGiftCard; - bool requireOtherProducts; - bool automaticallyAddRequiredProducts; - bool isDownload; - bool unlimitedDownloads; + bool? isGiftCard; + bool? requireOtherProducts; + bool? automaticallyAddRequiredProducts; + bool? isDownload; + bool? unlimitedDownloads; dynamic maxNumberOfDownloads; dynamic downloadExpirationDays; - bool hasSampleDownload; - bool hasUserAgreement; - bool isRecurring; + bool? hasSampleDownload; + bool? hasUserAgreement; + bool? isRecurring; dynamic recurringCycleLength; dynamic recurringTotalCycles; - bool isRental; + bool? isRental; dynamic rentalPriceLength; - bool isShipEnabled; - bool isFreeShipping; - bool shipSeparately; + bool? isShipEnabled; + bool? isFreeShipping; + bool? shipSeparately; dynamic additionalShippingCharge; - bool isTaxExempt; - bool isTelecommunicationsOrBroadcastingOrElectronicServices; - bool useMultipleWarehouses; + bool? isTaxExempt; + bool? isTelecommunicationsOrBroadcastingOrElectronicServices; + bool? useMultipleWarehouses; dynamic manageInventoryMethodId; dynamic stockQuantity; - String stockAvailability; - String stockAvailabilityn; - bool displayStockAvailability; - bool displayStockQuantity; + String? stockAvailability; + String? stockAvailabilityn; + bool? displayStockAvailability; + bool? displayStockQuantity; dynamic minStockQuantity; dynamic notifyAdminForQuantityBelow; - bool allowBackInStockSubscriptions; + bool? allowBackInStockSubscriptions; dynamic orderMinimumQuantity; dynamic orderMaximumQuantity; dynamic allowedQuantities; - bool allowAddingOnlyExistingAttributeCombinations; - bool disableBuyButton; - bool disableWishlistButton; - bool availableForPreOrder; + bool? allowAddingOnlyExistingAttributeCombinations; + bool? disableBuyButton; + bool? disableWishlistButton; + bool? availableForPreOrder; dynamic preOrderAvailabilityStartDateTimeUtc; - bool callForPrice; + bool? callForPrice; dynamic price; dynamic oldPrice; dynamic productCost; dynamic specialPrice; dynamic specialPriceStartDateTimeUtc; dynamic specialPriceEndDateTimeUtc; - bool customerEntersPrice; + bool? customerEntersPrice; dynamic minimumCustomerEnteredPrice; dynamic maximumCustomerEnteredPrice; - bool basepriceEnabled; + bool? basepriceEnabled; dynamic basepriceAmount; dynamic basepriceBaseAmount; - bool hasTierPrices; - bool hasDiscountsApplied; - String discountName; - String discountNamen; - String discountDescription; - String discountDescriptionn; + bool? hasTierPrices; + bool? hasDiscountsApplied; + String? discountName; + String? discountNamen; + String? discountDescription; + String? discountDescriptionn; dynamic discountPercentage; - String currency; - String currencyn; + String? currency; + String? currencyn; dynamic weight; dynamic length; dynamic width; @@ -92,24 +92,24 @@ class OfferProductsModel { dynamic availableStartDateTimeUtc; dynamic availableEndDateTimeUtc; dynamic displayOrder; - bool published; - bool deleted; - String createdOnUtc; - String updatedOnUtc; - String productType; + bool? published; + bool? deleted; + String? createdOnUtc; + String? updatedOnUtc; + String? productType; dynamic parentGroupedProductId; - List roleIds; - List discountIds; - List storeIds; - List manufacturerIds; - List reviews; - List images; - List attributes; - List specifications; - List associatedProductIds; - List tags; + List? roleIds; + List? discountIds; + List? storeIds; + List? manufacturerIds; + List? reviews; + List? images; + List? attributes; + List? specifications; + List? associatedProductIds; + List? tags; dynamic vendorId; - String seName; + String? seName; OfferProductsModel( {this.id, @@ -230,9 +230,9 @@ class OfferProductsModel { name = json['name']; namen = json['namen']; if (json['localized_names'] != null) { - localizedNames = new List(); + localizedNames = []; json['localized_names'].forEach((v) { - localizedNames.add(new LocalizedNames.fromJson(v)); + localizedNames!.add(new LocalizedNames.fromJson(v)); }); } shortDescription = json['short_description']; @@ -337,9 +337,9 @@ class OfferProductsModel { discountIds = json['discount_ids'].cast(); if (json['images'] != null) { - images = new List(); + images = []; json['images'].forEach((v) { - images.add(new Images.fromJson(v)); + images!.add(new Images.fromJson(v)); }); } @@ -355,7 +355,7 @@ class OfferProductsModel { data['namen'] = this.namen; if (this.localizedNames != null) { data['localized_names'] = - this.localizedNames.map((v) => v.toJson()).toList(); + this.localizedNames!.map((v) => v.toJson()).toList(); } data['short_description'] = this.shortDescription; data['short_descriptionn'] = this.shortDescriptionn; @@ -458,35 +458,35 @@ class OfferProductsModel { data['product_type'] = this.productType; data['parent_grouped_product_id'] = this.parentGroupedProductId; if (this.roleIds != null) { - data['role_ids'] = this.roleIds.map((v) => v.toJson()).toList(); + data['role_ids'] = this.roleIds!.map((v) => v.toJson()).toList(); } data['discount_ids'] = this.discountIds; if (this.storeIds != null) { - data['store_ids'] = this.storeIds.map((v) => v.toJson()).toList(); + data['store_ids'] = this.storeIds!.map((v) => v.toJson()).toList(); } if (this.manufacturerIds != null) { data['manufacturer_ids'] = - this.manufacturerIds.map((v) => v.toJson()).toList(); + this.manufacturerIds!.map((v) => v.toJson()).toList(); } if (this.reviews != null) { - data['reviews'] = this.reviews.map((v) => v.toJson()).toList(); + data['reviews'] = this.reviews!.map((v) => v.toJson()).toList(); } if (this.images != null) { - data['images'] = this.images.map((v) => v.toJson()).toList(); + data['images'] = this.images!.map((v) => v.toJson()).toList(); } if (this.attributes != null) { - data['attributes'] = this.attributes.map((v) => v.toJson()).toList(); + data['attributes'] = this.attributes!.map((v) => v.toJson()).toList(); } if (this.specifications != null) { data['specifications'] = - this.specifications.map((v) => v.toJson()).toList(); + this.specifications!.map((v) => v.toJson()).toList(); } if (this.associatedProductIds != null) { data['associated_product_ids'] = - this.associatedProductIds.map((v) => v.toJson()).toList(); + this.associatedProductIds!.map((v) => v.toJson()).toList(); } if (this.tags != null) { - data['tags'] = this.tags.map((v) => v.toJson()).toList(); + data['tags'] = this.tags!.map((v) => v.toJson()).toList(); } data['vendor_id'] = this.vendorId; data['se_name'] = this.seName; @@ -495,8 +495,8 @@ class OfferProductsModel { } class LocalizedNames { - int languageId; - String localizedName; + int? languageId; + String? localizedName; LocalizedNames({this.languageId, this.localizedName}); @@ -514,11 +514,11 @@ class LocalizedNames { } class Images { - int id; - int position; - String src; - String thumb; - String attachment; + int? id; + int? position; + String? src; + String? thumb; + String? attachment; Images({this.id, this.position, this.src, this.thumb, this.attachment}); @@ -542,12 +542,12 @@ class Images { } class Specifications { - int id; - int displayOrder; - String defaultValue; - String defaultValuen; - String name; - String nameN; + int? id; + int? displayOrder; + String? defaultValue; + String? defaultValuen; + String? name; + String? nameN; Specifications( {this.id, diff --git a/lib/core/model/pharmacy/offers_model.dart b/lib/core/model/pharmacy/offers_model.dart index 3add1d3d..7ba18053 100644 --- a/lib/core/model/pharmacy/offers_model.dart +++ b/lib/core/model/pharmacy/offers_model.dart @@ -1,31 +1,31 @@ class OffersModel { - String id; - String name; - String namen; - List localizedNames; + String? id; + String? name; + String? namen; + List? localizedNames; Null description; - int categoryTemplateId; - String metaKeywords; - String metaDescription; - String metaTitle; - int parentCategoryId; - int pageSize; - String pageSizeOptions; + int? categoryTemplateId; + String? metaKeywords; + String? metaDescription; + String? metaTitle; + int? parentCategoryId; + int? pageSize; + String? pageSizeOptions; Null priceRanges; - bool showOnHomePage; - bool includeInTopMenu; + bool? showOnHomePage; + bool? includeInTopMenu; Null hasDiscountsApplied; - bool published; - bool deleted; - int displayOrder; - String createdOnUtc; - String updatedOnUtc; - List roleIds; - List discountIds; - List storeIds; - Image image; - String seName; - bool isLeaf; + bool? published; + bool? deleted; + int? displayOrder; + String? createdOnUtc; + String? updatedOnUtc; + List? roleIds; + List? discountIds; + List? storeIds; + Image? image; + String? seName; + bool? isLeaf; OffersModel( {this.id, @@ -61,9 +61,9 @@ class OffersModel { name = json['name']; namen = json['namen']; if (json['localized_names'] != null) { - localizedNames = new List(); + localizedNames =[]; json['localized_names'].forEach((v) { - localizedNames.add(new LocalizedNames.fromJson(v)); + localizedNames!.add(new LocalizedNames.fromJson(v)); }); } description = json['description']; @@ -96,7 +96,7 @@ class OffersModel { data['namen'] = this.namen; if (this.localizedNames != null) { data['localized_names'] = - this.localizedNames.map((v) => v.toJson()).toList(); + this.localizedNames!.map((v) => v.toJson()).toList(); } data['description'] = this.description; data['category_template_id'] = this.categoryTemplateId; @@ -116,16 +116,16 @@ class OffersModel { data['created_on_utc'] = this.createdOnUtc; data['updated_on_utc'] = this.updatedOnUtc; if (this.roleIds != null) { - data['role_ids'] = this.roleIds.map((v) => v.toJson()).toList(); + data['role_ids'] = this.roleIds!.map((v) => v.toJson()).toList(); } if (this.discountIds != null) { - data['discount_ids'] = this.discountIds.map((v) => v.toJson()).toList(); + data['discount_ids'] = this.discountIds!.map((v) => v.toJson()).toList(); } if (this.storeIds != null) { - data['store_ids'] = this.storeIds.map((v) => v.toJson()).toList(); + data['store_ids'] = this.storeIds!.map((v) => v.toJson()).toList(); } if (this.image != null) { - data['image'] = this.image.toJson(); + data['image'] = this.image!.toJson(); } data['se_name'] = this.seName; data['is_leaf'] = this.isLeaf; @@ -134,8 +134,8 @@ class OffersModel { } class LocalizedNames { - int languageId; - String localizedName; + int? languageId; + String? localizedName; LocalizedNames({this.languageId, this.localizedName}); @@ -153,7 +153,7 @@ class LocalizedNames { } class Image { - String src; + String? src; Null thumb; Null attachment; diff --git a/lib/core/model/pharmacy/parent_products_model.dart b/lib/core/model/pharmacy/parent_products_model.dart index 55495416..14d4f03d 100644 --- a/lib/core/model/pharmacy/parent_products_model.dart +++ b/lib/core/model/pharmacy/parent_products_model.dart @@ -3,7 +3,7 @@ class ParentProductsModel { dynamic visibleIndividually; dynamic name; dynamic namen; - List localizedNames; + List? localizedNames; dynamic shortDescription; dynamic shortDescriptionn; dynamic fullDescription; @@ -98,18 +98,18 @@ class ParentProductsModel { dynamic updatedOnUtc; dynamic productType; dynamic parentGroupedProductId; - List roleIds; - List discountIds; - List storeIds; - List manufacturerIds; - List reviews; - List images; - List attributes; - List specifications; - List associatedProductIds; - List tags; + List? roleIds; + List? discountIds; + List? storeIds; + List? manufacturerIds; + List? reviews; + List? images; + List? attributes; + List? specifications; + List? associatedProductIds; + List? tags; dynamic vendorId; - String seName; + String? seName; ParentProductsModel( {this.id, @@ -229,16 +229,16 @@ class ParentProductsModel { visibleIndividually = json['visible_individually']; name = json['name']; if (json['images'] != null) { - images = new List(); + images = []; json['images'].forEach((v) { - images.add(new Images.fromJson(v)); + images!.add(new Images.fromJson(v)); }); } namen = json['namen']; if (json['localized_names'] != null) { - localizedNames = new List(); + localizedNames = []; json['localized_names'].forEach((v) { - localizedNames.add(new LocalizedNames.fromJson(v)); + localizedNames!.add(new LocalizedNames.fromJson(v)); }); } shortDescription = json['short_description']; @@ -264,8 +264,7 @@ class ParentProductsModel { gtin = json['gtin']; isGiftCard = json['is_gift_card']; requireOtherProducts = json['require_other_products']; - automaticallyAddRequiredProducts = - json['automatically_add_required_products']; + automaticallyAddRequiredProducts = json['automatically_add_required_products']; isDownload = json['is_download']; unlimitedDownloads = json['unlimited_downloads']; maxNumberOfDownloads = json['max_number_of_downloads']; @@ -282,8 +281,7 @@ class ParentProductsModel { shipSeparately = json['ship_separately']; additionalShippingCharge = json['additional_shipping_charge']; isTaxExempt = json['is_tax_exempt']; - isTelecommunicationsOrBroadcastingOrElectronicServices = - json['is_telecommunications_or_broadcasting_or_electronic_services']; + isTelecommunicationsOrBroadcastingOrElectronicServices = json['is_telecommunications_or_broadcasting_or_electronic_services']; useMultipleWarehouses = json['use_multiple_warehouses']; manageInventoryMethodId = json['manage_inventory_method_id']; stockQuantity = json['stock_quantity']; @@ -297,13 +295,11 @@ class ParentProductsModel { orderMinimumQuantity = json['order_minimum_quantity']; orderMaximumQuantity = json['order_maximum_quantity']; allowedQuantities = json['allowed_quantities']; - allowAddingOnlyExistingAttributeCombinations = - json['allow_adding_only_existing_attribute_combinations']; + allowAddingOnlyExistingAttributeCombinations = json['allow_adding_only_existing_attribute_combinations']; disableBuyButton = json['disable_buy_button']; disableWishlistButton = json['disable_wishlist_button']; availableForPreOrder = json['available_for_pre_order']; - preOrderAvailabilityStartDateTimeUtc = - json['pre_order_availability_start_date_time_utc']; + preOrderAvailabilityStartDateTimeUtc = json['pre_order_availability_start_date_time_utc']; callForPrice = json['call_for_price']; price = json['price']; oldPrice = json['old_price']; @@ -343,9 +339,9 @@ class ParentProductsModel { manufacturerIds = json['manufacturer_ids'].cast(); if (json['specifications'] != null) { - specifications = new List(); + specifications = []; json['specifications'].forEach((v) { - specifications.add(new Specifications.fromJson(v)); + specifications!.add(new Specifications.fromJson(v)); }); } @@ -360,8 +356,7 @@ class ParentProductsModel { data['name'] = this.name; data['namen'] = this.namen; if (this.localizedNames != null) { - data['localized_names'] = - this.localizedNames.map((v) => v.toJson()).toList(); + data['localized_names'] = this.localizedNames!.map((v) => v.toJson()).toList(); } data['short_description'] = this.shortDescription; data['short_descriptionn'] = this.shortDescriptionn; @@ -386,8 +381,7 @@ class ParentProductsModel { data['gtin'] = this.gtin; data['is_gift_card'] = this.isGiftCard; data['require_other_products'] = this.requireOtherProducts; - data['automatically_add_required_products'] = - this.automaticallyAddRequiredProducts; + data['automatically_add_required_products'] = this.automaticallyAddRequiredProducts; data['is_download'] = this.isDownload; data['unlimited_downloads'] = this.unlimitedDownloads; data['max_number_of_downloads'] = this.maxNumberOfDownloads; @@ -404,8 +398,7 @@ class ParentProductsModel { data['ship_separately'] = this.shipSeparately; data['additional_shipping_charge'] = this.additionalShippingCharge; data['is_tax_exempt'] = this.isTaxExempt; - data['is_telecommunications_or_broadcasting_or_electronic_services'] = - this.isTelecommunicationsOrBroadcastingOrElectronicServices; + data['is_telecommunications_or_broadcasting_or_electronic_services'] = this.isTelecommunicationsOrBroadcastingOrElectronicServices; data['use_multiple_warehouses'] = this.useMultipleWarehouses; data['manage_inventory_method_id'] = this.manageInventoryMethodId; data['stock_quantity'] = this.stockQuantity; @@ -415,25 +408,21 @@ class ParentProductsModel { data['display_stock_quantity'] = this.displayStockQuantity; data['min_stock_quantity'] = this.minStockQuantity; data['notify_admin_for_quantity_below'] = this.notifyAdminForQuantityBelow; - data['allow_back_in_stock_subscriptions'] = - this.allowBackInStockSubscriptions; + data['allow_back_in_stock_subscriptions'] = this.allowBackInStockSubscriptions; data['order_minimum_quantity'] = this.orderMinimumQuantity; data['order_maximum_quantity'] = this.orderMaximumQuantity; data['allowed_quantities'] = this.allowedQuantities; - data['allow_adding_only_existing_attribute_combinations'] = - this.allowAddingOnlyExistingAttributeCombinations; + data['allow_adding_only_existing_attribute_combinations'] = this.allowAddingOnlyExistingAttributeCombinations; data['disable_buy_button'] = this.disableBuyButton; data['disable_wishlist_button'] = this.disableWishlistButton; data['available_for_pre_order'] = this.availableForPreOrder; - data['pre_order_availability_start_date_time_utc'] = - this.preOrderAvailabilityStartDateTimeUtc; + data['pre_order_availability_start_date_time_utc'] = this.preOrderAvailabilityStartDateTimeUtc; data['call_for_price'] = this.callForPrice; data['price'] = this.price; data['old_price'] = this.oldPrice; data['product_cost'] = this.productCost; data['special_price'] = this.specialPrice; - data['special_price_start_date_time_utc'] = - this.specialPriceStartDateTimeUtc; + data['special_price_start_date_time_utc'] = this.specialPriceStartDateTimeUtc; data['special_price_end_date_time_utc'] = this.specialPriceEndDateTimeUtc; data['customer_enters_price'] = this.customerEntersPrice; data['minimum_customer_entered_price'] = this.minimumCustomerEnteredPrice; @@ -467,12 +456,11 @@ class ParentProductsModel { data['manufacturer_ids'] = this.manufacturerIds; if (this.images != null) { - data['images'] = this.images.map((v) => v.toJson()).toList(); + data['images'] = this.images!.map((v) => v.toJson()).toList(); } if (this.specifications != null) { - data['specifications'] = - this.specifications.map((v) => v.toJson()).toList(); + data['specifications'] = this.specifications!.map((v) => v.toJson()).toList(); } data['vendor_id'] = this.vendorId; @@ -482,8 +470,8 @@ class ParentProductsModel { } class LocalizedNames { - int languageId; - String localizedName; + int? languageId; + String? localizedName; LocalizedNames({this.languageId, this.localizedName}); @@ -501,11 +489,11 @@ class LocalizedNames { } class Images { - int id; - int position; - String src; - String thumb; - String attachment; + int? id; + int? position; + String? src; + String? thumb; + String? attachment; Images({this.id, this.position, this.src, this.thumb, this.attachment}); @@ -529,20 +517,14 @@ class Images { } class Specifications { - int id; - int displayOrder; - String defaultValue; - String defaultValuen; - String name; - String nameN; + int? id; + int? displayOrder; + String? defaultValue; + String? defaultValuen; + String? name; + String? nameN; - Specifications( - {this.id, - this.displayOrder, - this.defaultValue, - this.defaultValuen, - this.name, - this.nameN}); + Specifications({this.id, this.displayOrder, this.defaultValue, this.defaultValuen, this.name, this.nameN}); Specifications.fromJson(Map json) { id = json['id']; diff --git a/lib/core/model/pharmacy/pharmacy_categorise.dart b/lib/core/model/pharmacy/pharmacy_categorise.dart index 33ac26f1..bca595b8 100644 --- a/lib/core/model/pharmacy/pharmacy_categorise.dart +++ b/lib/core/model/pharmacy/pharmacy_categorise.dart @@ -1,24 +1,15 @@ class PharmacyCategorise { dynamic id; - String name; + String? name; dynamic namen; - List localizedNames; + List? localizedNames; dynamic description; dynamic parentCategoryId; dynamic displayOrder; dynamic image; dynamic isLeaf; - PharmacyCategorise( - {this.id, - this.name, - this.namen, - this.localizedNames, - this.description, - this.parentCategoryId, - this.displayOrder, - this.image, - this.isLeaf}); + PharmacyCategorise({this.id, this.name, this.namen, this.localizedNames, this.description, this.parentCategoryId, this.displayOrder, this.image, this.isLeaf}); PharmacyCategorise.fromJson(Map json) { try { @@ -26,9 +17,9 @@ class PharmacyCategorise { name = json['name']; namen = json['namen']; if (json['localized_names'] != null) { - localizedNames = new List(); + localizedNames = []; json['localized_names'].forEach((v) { - localizedNames.add(new LocalizedNames.fromJson(v)); + localizedNames!.add(new LocalizedNames.fromJson(v)); }); } description = json['description']; @@ -47,8 +38,7 @@ class PharmacyCategorise { data['name'] = this.name; data['namen'] = this.namen; if (this.localizedNames != null) { - data['localized_names'] = - this.localizedNames.map((v) => v.toJson()).toList(); + data['localized_names'] = this.localizedNames!.map((v) => v.toJson()).toList(); } data['description'] = this.description; data['parent_category_id'] = this.parentCategoryId; @@ -62,8 +52,8 @@ class PharmacyCategorise { } class LocalizedNames { - int languageId; - String localizedName; + int? languageId; + String? localizedName; LocalizedNames({this.languageId, this.localizedName}); @@ -81,7 +71,7 @@ class LocalizedNames { } class Image { - String src; + String? src; Null thumb; Null attachment; diff --git a/lib/core/model/pharmacy/scan_qr_model.dart b/lib/core/model/pharmacy/scan_qr_model.dart index 71e25e8d..3adcba75 100644 --- a/lib/core/model/pharmacy/scan_qr_model.dart +++ b/lib/core/model/pharmacy/scan_qr_model.dart @@ -1,115 +1,115 @@ class ScanQrModel { - String id; - bool visibleIndividually; - String name; - String namen; - List localizedNames; - String shortDescription; - String shortDescriptionn; - String fullDescription; - String fullDescriptionn; - bool markasNew; - bool showOnHomePage; + String? id; + bool? visibleIndividually; + String? name; + String? namen; + List? localizedNames; + String? shortDescription; + String? shortDescriptionn; + String? fullDescription; + String? fullDescriptionn; + bool? markasNew; + bool? showOnHomePage; dynamic metaKeywords; dynamic metaDescription; dynamic metaTitle; - bool allowCustomerReviews; + bool? allowCustomerReviews; dynamic approvedRatingSum; dynamic notApprovedRatingSum; dynamic approvedTotalReviews; dynamic notApprovedTotalReviews; - String sku; - bool isRx; - bool prescriptionRequired; + String? sku; + bool? isRx; + bool? prescriptionRequired; dynamic rxMessage; dynamic rxMessagen; dynamic manufacturerPartNumber; dynamic gtin; - bool isGiftCard; - bool requireOtherProducts; - bool automaticallyAddRequiredProducts; - bool isDownload; - bool unlimitedDownloads; + bool? isGiftCard; + bool? requireOtherProducts; + bool? automaticallyAddRequiredProducts; + bool? isDownload; + bool? unlimitedDownloads; dynamic maxNumberOfDownloads; dynamic downloadExpirationDays; - bool hasSampleDownload; - bool hasUserAgreement; - bool isRecurring; + bool? hasSampleDownload; + bool? hasUserAgreement; + bool? isRecurring; dynamic recurringCycleLength; dynamic recurringTotalCycles; - bool isRental; + bool? isRental; dynamic rentalPriceLength; - bool isShipEnabled; - bool isFreeShipping; - bool shipSeparately; + bool? isShipEnabled; + bool? isFreeShipping; + bool? shipSeparately; dynamic additionalShippingCharge; - bool isTaxExempt; - bool isTelecommunicationsOrBroadcastingOrElectronicServices; - bool useMultipleWarehouses; + bool? isTaxExempt; + bool? isTelecommunicationsOrBroadcastingOrElectronicServices; + bool? useMultipleWarehouses; dynamic manageInventoryMethodId; dynamic stockQuantity; - String stockAvailability; - String stockAvailabilityn; - bool displayStockAvailability; - bool displayStockQuantity; + String? stockAvailability; + String? stockAvailabilityn; + bool? displayStockAvailability; + bool? displayStockQuantity; dynamic minStockQuantity; dynamic notifyAdminForQuantityBelow; - bool allowBackInStockSubscriptions; + bool? allowBackInStockSubscriptions; dynamic orderMinimumQuantity; dynamic orderMaximumQuantity; dynamic allowedQuantities; - bool allowAddingOnlyExistingAttributeCombinations; - bool disableBuyButton; - bool disableWishlistButton; - bool availableForPreOrder; + bool? allowAddingOnlyExistingAttributeCombinations; + bool? disableBuyButton; + bool? disableWishlistButton; + bool? availableForPreOrder; dynamic preOrderAvailabilityStartDateTimeUtc; - bool callForPrice; + bool? callForPrice; dynamic price; dynamic oldPrice; dynamic productCost; dynamic specialPrice; dynamic specialPriceStartDateTimeUtc; dynamic specialPriceEndDateTimeUtc; - bool customerEntersPrice; + bool? customerEntersPrice; dynamic minimumCustomerEnteredPrice; dynamic maximumCustomerEnteredPrice; - bool basepriceEnabled; + bool? basepriceEnabled; dynamic basepriceAmount; dynamic basepriceBaseAmount; - bool hasTierPrices; - bool hasDiscountsApplied; + bool? hasTierPrices; + bool? hasDiscountsApplied; dynamic discountName; dynamic discountNamen; dynamic discountDescription; dynamic discountDescriptionn; dynamic discountPercentage; - String currency; - String currencyn; - double weight; + String? currency; + String? currencyn; + double? weight; dynamic length; dynamic width; dynamic height; dynamic availableStartDateTimeUtc; dynamic availableEndDateTimeUtc; dynamic displayOrder; - bool published; - bool deleted; - String createdOnUtc; - String updatedOnUtc; - String productType; + bool? published; + bool? deleted; + String? createdOnUtc; + String? updatedOnUtc; + String? productType; dynamic parentGroupedProductId; - List roleIds; - List discountIds; - List storeIds; - List manufacturerIds; - List reviews; - List images; - List attributes; - List specifications; - List associatedProductIds; - List tags; + List? roleIds; + List? discountIds; + List? storeIds; + List? manufacturerIds; + List? reviews; + List? images; + List? attributes; + List? specifications; + List? associatedProductIds; + List? tags; dynamic vendorId; - String seName; + String? seName; ScanQrModel( {this.id, @@ -230,9 +230,9 @@ class ScanQrModel { name = json['name']; namen = json['namen']; if (json['localized_names'] != null) { - localizedNames = new List(); + localizedNames = []; json['localized_names'].forEach((v) { - localizedNames.add(new LocalizedNames.fromJson(v)); + localizedNames!.add(new LocalizedNames.fromJson(v)); }); } shortDescription = json['short_description']; @@ -258,8 +258,7 @@ class ScanQrModel { gtin = json['gtin']; isGiftCard = json['is_gift_card']; requireOtherProducts = json['require_other_products']; - automaticallyAddRequiredProducts = - json['automatically_add_required_products']; + automaticallyAddRequiredProducts = json['automatically_add_required_products']; isDownload = json['is_download']; unlimitedDownloads = json['unlimited_downloads']; maxNumberOfDownloads = json['max_number_of_downloads']; @@ -276,8 +275,7 @@ class ScanQrModel { shipSeparately = json['ship_separately']; additionalShippingCharge = json['additional_shipping_charge']; isTaxExempt = json['is_tax_exempt']; - isTelecommunicationsOrBroadcastingOrElectronicServices = - json['is_telecommunications_or_broadcasting_or_electronic_services']; + isTelecommunicationsOrBroadcastingOrElectronicServices = json['is_telecommunications_or_broadcasting_or_electronic_services']; useMultipleWarehouses = json['use_multiple_warehouses']; manageInventoryMethodId = json['manage_inventory_method_id']; stockQuantity = json['stock_quantity']; @@ -291,13 +289,11 @@ class ScanQrModel { orderMinimumQuantity = json['order_minimum_quantity']; orderMaximumQuantity = json['order_maximum_quantity']; allowedQuantities = json['allowed_quantities']; - allowAddingOnlyExistingAttributeCombinations = - json['allow_adding_only_existing_attribute_combinations']; + allowAddingOnlyExistingAttributeCombinations = json['allow_adding_only_existing_attribute_combinations']; disableBuyButton = json['disable_buy_button']; disableWishlistButton = json['disable_wishlist_button']; availableForPreOrder = json['available_for_pre_order']; - preOrderAvailabilityStartDateTimeUtc = - json['pre_order_availability_start_date_time_utc']; + preOrderAvailabilityStartDateTimeUtc = json['pre_order_availability_start_date_time_utc']; callForPrice = json['call_for_price']; price = json['price']; oldPrice = json['old_price']; @@ -334,38 +330,38 @@ class ScanQrModel { productType = json['product_type']; parentGroupedProductId = json['parent_grouped_product_id']; if (json['role_ids'] != null) { - roleIds = new List(); + roleIds = []; } if (json['discount_ids'] != null) { - discountIds = new List(); + discountIds = []; } if (json['store_ids'] != null) { - storeIds = new List(); + storeIds = []; } manufacturerIds = json['manufacturer_ids'].cast(); if (json['reviews'] != null) { - reviews = new List(); + reviews = []; } if (json['images'] != null) { - images = new List(); + images = []; json['images'].forEach((v) { - images.add(new Images.fromJson(v)); + images!.add(new Images.fromJson(v)); }); } if (json['attributes'] != null) { - attributes = new List(); + attributes = []; } if (json['specifications'] != null) { - specifications = new List(); + specifications = []; json['specifications'].forEach((v) { - specifications.add(new Specifications.fromJson(v)); + specifications!.add(new Specifications.fromJson(v)); }); } if (json['associated_product_ids'] != null) { - associatedProductIds = new List(); + associatedProductIds = []; } if (json['tags'] != null) { - tags = new List(); + tags = []; } vendorId = json['vendor_id']; seName = json['se_name']; @@ -378,8 +374,7 @@ class ScanQrModel { data['name'] = this.name; data['namen'] = this.namen; if (this.localizedNames != null) { - data['localized_names'] = - this.localizedNames.map((v) => v.toJson()).toList(); + data['localized_names'] = this.localizedNames!.map((v) => v.toJson()).toList(); } data['short_description'] = this.shortDescription; data['short_descriptionn'] = this.shortDescriptionn; @@ -404,8 +399,7 @@ class ScanQrModel { data['gtin'] = this.gtin; data['is_gift_card'] = this.isGiftCard; data['require_other_products'] = this.requireOtherProducts; - data['automatically_add_required_products'] = - this.automaticallyAddRequiredProducts; + data['automatically_add_required_products'] = this.automaticallyAddRequiredProducts; data['is_download'] = this.isDownload; data['unlimited_downloads'] = this.unlimitedDownloads; data['max_number_of_downloads'] = this.maxNumberOfDownloads; @@ -422,8 +416,7 @@ class ScanQrModel { data['ship_separately'] = this.shipSeparately; data['additional_shipping_charge'] = this.additionalShippingCharge; data['is_tax_exempt'] = this.isTaxExempt; - data['is_telecommunications_or_broadcasting_or_electronic_services'] = - this.isTelecommunicationsOrBroadcastingOrElectronicServices; + data['is_telecommunications_or_broadcasting_or_electronic_services'] = this.isTelecommunicationsOrBroadcastingOrElectronicServices; data['use_multiple_warehouses'] = this.useMultipleWarehouses; data['manage_inventory_method_id'] = this.manageInventoryMethodId; data['stock_quantity'] = this.stockQuantity; @@ -433,25 +426,21 @@ class ScanQrModel { data['display_stock_quantity'] = this.displayStockQuantity; data['min_stock_quantity'] = this.minStockQuantity; data['notify_admin_for_quantity_below'] = this.notifyAdminForQuantityBelow; - data['allow_back_in_stock_subscriptions'] = - this.allowBackInStockSubscriptions; + data['allow_back_in_stock_subscriptions'] = this.allowBackInStockSubscriptions; data['order_minimum_quantity'] = this.orderMinimumQuantity; data['order_maximum_quantity'] = this.orderMaximumQuantity; data['allowed_quantities'] = this.allowedQuantities; - data['allow_adding_only_existing_attribute_combinations'] = - this.allowAddingOnlyExistingAttributeCombinations; + data['allow_adding_only_existing_attribute_combinations'] = this.allowAddingOnlyExistingAttributeCombinations; data['disable_buy_button'] = this.disableBuyButton; data['disable_wishlist_button'] = this.disableWishlistButton; data['available_for_pre_order'] = this.availableForPreOrder; - data['pre_order_availability_start_date_time_utc'] = - this.preOrderAvailabilityStartDateTimeUtc; + data['pre_order_availability_start_date_time_utc'] = this.preOrderAvailabilityStartDateTimeUtc; data['call_for_price'] = this.callForPrice; data['price'] = this.price; data['old_price'] = this.oldPrice; data['product_cost'] = this.productCost; data['special_price'] = this.specialPrice; - data['special_price_start_date_time_utc'] = - this.specialPriceStartDateTimeUtc; + data['special_price_start_date_time_utc'] = this.specialPriceStartDateTimeUtc; data['special_price_end_date_time_utc'] = this.specialPriceEndDateTimeUtc; data['customer_enters_price'] = this.customerEntersPrice; data['minimum_customer_entered_price'] = this.minimumCustomerEnteredPrice; @@ -485,12 +474,11 @@ class ScanQrModel { data['manufacturer_ids'] = this.manufacturerIds; if (this.images != null) { - data['images'] = this.images.map((v) => v.toJson()).toList(); + data['images'] = this.images!.map((v) => v.toJson()).toList(); } if (this.specifications != null) { - data['specifications'] = - this.specifications.map((v) => v.toJson()).toList(); + data['specifications'] = this.specifications!.map((v) => v.toJson()).toList(); } data['vendor_id'] = this.vendorId; @@ -500,8 +488,8 @@ class ScanQrModel { } class LocalizedNames { - int languageId; - String localizedName; + int? languageId; + String? localizedName; LocalizedNames({this.languageId, this.localizedName}); @@ -519,11 +507,11 @@ class LocalizedNames { } class Images { - int id; - int position; - String src; - String thumb; - String attachment; + int? id; + int? position; + String? src; + String? thumb; + String? attachment; Images({this.id, this.position, this.src, this.thumb, this.attachment}); @@ -547,20 +535,14 @@ class Images { } class Specifications { - int id; - int displayOrder; - String defaultValue; - String defaultValuen; - String name; - String nameN; + int? id; + int? displayOrder; + String? defaultValue; + String? defaultValuen; + String? name; + String? nameN; - Specifications( - {this.id, - this.displayOrder, - this.defaultValue, - this.defaultValuen, - this.name, - this.nameN}); + Specifications({this.id, this.displayOrder, this.defaultValue, this.defaultValuen, this.name, this.nameN}); Specifications.fromJson(Map json) { id = json['id']; diff --git a/lib/core/model/pharmacy/sub_categories_model.dart b/lib/core/model/pharmacy/sub_categories_model.dart index 916ec023..cbaf4b16 100644 --- a/lib/core/model/pharmacy/sub_categories_model.dart +++ b/lib/core/model/pharmacy/sub_categories_model.dart @@ -1,13 +1,13 @@ class SubCategoriesModel { - String id; - String name; - String namen; - List localizedNames; - String description; - int parentCategoryId; - int displayOrder; + String? id; + String? name; + String? namen; + List? localizedNames; + String? description; + int? parentCategoryId; + int? displayOrder; dynamic image; - bool isLeaf; + bool? isLeaf; SubCategoriesModel( {this.id, @@ -25,9 +25,9 @@ class SubCategoriesModel { name = json['name']; namen = json['namen']; if (json['localized_names'] != null) { - localizedNames = new List(); + localizedNames = []; json['localized_names'].forEach((v) { - localizedNames.add(new LocalizedNames.fromJson(v)); + localizedNames!.add(new LocalizedNames.fromJson(v)); }); } description = json['description']; @@ -44,7 +44,7 @@ class SubCategoriesModel { data['namen'] = this.namen; if (this.localizedNames != null) { data['localized_names'] = - this.localizedNames.map((v) => v.toJson()).toList(); + this.localizedNames!.map((v) => v.toJson()).toList(); } data['description'] = this.description; data['parent_category_id'] = this.parentCategoryId; @@ -56,8 +56,8 @@ class SubCategoriesModel { } class LocalizedNames { - int languageId; - String localizedName; + int? languageId; + String? localizedName; LocalizedNames({this.languageId, this.localizedName}); diff --git a/lib/core/model/pharmacy/sub_products_model.dart b/lib/core/model/pharmacy/sub_products_model.dart index 6e8964c9..fe5c8dd1 100644 --- a/lib/core/model/pharmacy/sub_products_model.dart +++ b/lib/core/model/pharmacy/sub_products_model.dart @@ -1,115 +1,115 @@ class SubProductsModel { - String id; - bool visibleIndividually; - String name; - String namen; - List localizedNames; - String shortDescription; - String shortDescriptionn; - String fullDescription; - String fullDescriptionn; - bool markasNew; - bool showOnHomePage; + String? id; + bool? visibleIndividually; + String? name; + String? namen; + List? localizedNames; + String? shortDescription; + String? shortDescriptionn; + String? fullDescription; + String? fullDescriptionn; + bool? markasNew; + bool? showOnHomePage; dynamic metaKeywords; dynamic metaDescription; dynamic metaTitle; - bool allowCustomerReviews; + bool? allowCustomerReviews; dynamic approvedRatingSum; dynamic notApprovedRatingSum; dynamic approvedTotalReviews; dynamic notApprovedTotalReviews; - String sku; - bool isRx; - bool prescriptionRequired; + String? sku; + bool? isRx; + bool? prescriptionRequired; dynamic rxMessage; dynamic rxMessagen; dynamic manufacturerPartNumber; dynamic gtin; - bool isGiftCard; - bool requireOtherProducts; - bool automaticallyAddRequiredProducts; - bool isDownload; - bool unlimitedDownloads; + bool? isGiftCard; + bool? requireOtherProducts; + bool? automaticallyAddRequiredProducts; + bool? isDownload; + bool? unlimitedDownloads; dynamic maxNumberOfDownloads; dynamic downloadExpirationDays; - bool hasSampleDownload; - bool hasUserAgreement; - bool isRecurring; + bool? hasSampleDownload; + bool? hasUserAgreement; + bool? isRecurring; dynamic recurringCycleLength; dynamic recurringTotalCycles; - bool isRental; + bool? isRental; dynamic rentalPriceLength; - bool isShipEnabled; - bool isFreeShipping; - bool shipSeparately; + bool? isShipEnabled; + bool? isFreeShipping; + bool? shipSeparately; dynamic additionalShippingCharge; - bool isTaxExempt; - bool isTelecommunicationsOrBroadcastingOrElectronicServices; - bool useMultipleWarehouses; + bool? isTaxExempt; + bool? isTelecommunicationsOrBroadcastingOrElectronicServices; + bool? useMultipleWarehouses; dynamic manageInventoryMethodId; dynamic stockQuantity; - String stockAvailability; - String stockAvailabilityn; - bool displayStockAvailability; - bool displayStockQuantity; + String? stockAvailability; + String? stockAvailabilityn; + bool? displayStockAvailability; + bool? displayStockQuantity; dynamic minStockQuantity; dynamic notifyAdminForQuantityBelow; - bool allowBackInStockSubscriptions; + bool? allowBackInStockSubscriptions; dynamic orderMinimumQuantity; dynamic orderMaximumQuantity; dynamic allowedQuantities; - bool allowAddingOnlyExistingAttributeCombinations; - bool disableBuyButton; - bool disableWishlistButton; - bool availableForPreOrder; + bool? allowAddingOnlyExistingAttributeCombinations; + bool? disableBuyButton; + bool? disableWishlistButton; + bool? availableForPreOrder; dynamic preOrderAvailabilityStartDateTimeUtc; - bool callForPrice; + bool? callForPrice; dynamic price; dynamic oldPrice; dynamic productCost; dynamic specialPrice; dynamic specialPriceStartDateTimeUtc; dynamic specialPriceEndDateTimeUtc; - bool customerEntersPrice; + bool? customerEntersPrice; dynamic minimumCustomerEnteredPrice; dynamic maximumCustomerEnteredPrice; - bool basepriceEnabled; + bool? basepriceEnabled; dynamic basepriceAmount; dynamic basepriceBaseAmount; - bool hasTierPrices; - bool hasDiscountsApplied; + bool? hasTierPrices; + bool? hasDiscountsApplied; dynamic discountName; dynamic discountNamen; dynamic discountDescription; dynamic discountDescriptionn; dynamic discountPercentage; - String currency; - String currencyn; - double weight; + String? currency; + String? currencyn; + double? weight; dynamic length; dynamic width; dynamic height; dynamic availableStartDateTimeUtc; dynamic availableEndDateTimeUtc; dynamic displayOrder; - bool published; - bool deleted; - String createdOnUtc; - String updatedOnUtc; - String productType; + bool? published; + bool? deleted; + String? createdOnUtc; + String? updatedOnUtc; + String? productType; dynamic parentGroupedProductId; - List roleIds; - List discountIds; - List storeIds; - List manufacturerIds; - List reviews; - List images; - List attributes; - List specifications; - List associatedProductIds; - List tags; + List? roleIds; + List? discountIds; + List? storeIds; + List? manufacturerIds; + List? reviews; + List? images; + List? attributes; + List? specifications; + List? associatedProductIds; + List? tags; dynamic vendorId; - String seName; + String? seName; SubProductsModel( {this.id, @@ -229,16 +229,16 @@ class SubProductsModel { visibleIndividually = json['visible_individually']; name = json['name']; if (json['images'] != null) { - images = new List(); + images = []; json['images'].forEach((v) { - images.add(new Images.fromJson(v)); + images!.add(new Images.fromJson(v)); }); } namen = json['namen']; if (json['localized_names'] != null) { - localizedNames = new List(); + localizedNames = []; json['localized_names'].forEach((v) { - localizedNames.add(new LocalizedNames.fromJson(v)); + localizedNames!.add(new LocalizedNames.fromJson(v)); }); } shortDescription = json['short_description']; @@ -343,9 +343,9 @@ class SubProductsModel { manufacturerIds = json['manufacturer_ids'].cast(); if (json['specifications'] != null) { - specifications = new List(); + specifications = []; json['specifications'].forEach((v) { - specifications.add(new Specifications.fromJson(v)); + specifications!.add(new Specifications.fromJson(v)); }); } @@ -361,7 +361,7 @@ class SubProductsModel { data['namen'] = this.namen; if (this.localizedNames != null) { data['localized_names'] = - this.localizedNames.map((v) => v.toJson()).toList(); + this.localizedNames!.map((v) => v.toJson()).toList(); } data['short_description'] = this.shortDescription; data['short_descriptionn'] = this.shortDescriptionn; @@ -468,7 +468,7 @@ class SubProductsModel { if (this.specifications != null) { data['specifications'] = - this.specifications.map((v) => v.toJson()).toList(); + this.specifications!.map((v) => v.toJson()).toList(); } data['vendor_id'] = this.vendorId; @@ -478,8 +478,8 @@ class SubProductsModel { } class LocalizedNames { - int languageId; - String localizedName; + int? languageId; + String? localizedName; LocalizedNames({this.languageId, this.localizedName}); @@ -497,11 +497,11 @@ class LocalizedNames { } class Images { - int id; - int position; - String src; - String thumb; - String attachment; + int? id; + int? position; + String? src; + String? thumb; + String? attachment; Images({this.id, this.position, this.src, this.thumb, this.attachment}); @@ -525,12 +525,12 @@ class Images { } class Specifications { - int id; - int displayOrder; - String defaultValue; - String defaultValuen; - String name; - String nameN; + int? id; + int? displayOrder; + String? defaultValue; + String? defaultValuen; + String? name; + String? nameN; Specifications( {this.id, diff --git a/lib/core/model/prescriptions/Prescriptions.dart b/lib/core/model/prescriptions/Prescriptions.dart index 0169010f..6e63bdad 100644 --- a/lib/core/model/prescriptions/Prescriptions.dart +++ b/lib/core/model/prescriptions/Prescriptions.dart @@ -1,40 +1,40 @@ import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; class Prescriptions { - String setupID; - int projectID; - int patientID; - int appointmentNo; - String appointmentDate; - String doctorName; - String clinicDescription; - String name; - int episodeID; - int actualDoctorRate; - int admission; - int clinicID; - String companyName; - String despensedStatus; - DateTime dischargeDate; - int dischargeNo; - int doctorID; - String doctorImageURL; - int doctorRate; - String doctorTitle; - int gender; - String genderDescription; - bool isActiveDoctorProfile; - bool isDoctorAllowVedioCall; - bool isExecludeDoctor; - bool isInOutPatient; - bool isLiveCareAppointment; - String isInOutPatientDescription; - String isInOutPatientDescriptionN; - bool isInsurancePatient; - String nationalityFlagURL; - int noOfPatientsRate; - String qR; - List speciality; + String? setupID; + int? projectID; + int? patientID; + int? appointmentNo; + String? appointmentDate; + String? doctorName; + String? clinicDescription; + String? name; + int? episodeID; + int? actualDoctorRate; + int? admission; + int? clinicID; + String? companyName; + String? despensedStatus; + DateTime? dischargeDate; + int? dischargeNo; + int? doctorID; + String? doctorImageURL; + int? doctorRate; + String? doctorTitle; + int? gender; + String? genderDescription; + bool? isActiveDoctorProfile; + bool? isDoctorAllowVedioCall; + bool? isExecludeDoctor; + bool? isInOutPatient; + bool? isLiveCareAppointment; + String? isInOutPatientDescription; + String? isInOutPatientDescriptionN; + bool? isInsurancePatient; + String? nationalityFlagURL; + int? noOfPatientsRate; + String? qR; + List? speciality; Prescriptions( {this.setupID, @@ -149,10 +149,10 @@ class Prescriptions { } class PrescriptionsList { - String filterName = ""; - List prescriptionsList = List(); + String? filterName = ""; + List? prescriptionsList = []; - PrescriptionsList({this.filterName, Prescriptions prescriptions}) { - prescriptionsList.add(prescriptions); + PrescriptionsList({this.filterName, Prescriptions? prescriptions}) { + prescriptionsList!.add(prescriptions!); } } diff --git a/lib/core/model/prescriptions/perscription_pharmacy.dart b/lib/core/model/prescriptions/perscription_pharmacy.dart index 9c9bec08..90773c79 100644 --- a/lib/core/model/prescriptions/perscription_pharmacy.dart +++ b/lib/core/model/prescriptions/perscription_pharmacy.dart @@ -1,27 +1,27 @@ class PharmacyPrescriptions { - String expiryDate; + String? expiryDate; dynamic sellingPrice; - int quantity; - int itemID; - int locationID; - int projectID; - String setupID; - String locationDescription; + int? quantity; + int? itemID; + int? locationID; + int? projectID; + String? setupID; + String? locationDescription; dynamic locationDescriptionN; - String itemDescription; + String? itemDescription; Null itemDescriptionN; - String alias; - int locationTypeID; - int barcode; + String? alias; + int? locationTypeID; + int? barcode; Null companybarcode; - int cityID; - String cityName; + int? cityID; + String? cityName; dynamic distanceInKilometers; - String latitude; - int locationType; - String longitude; - String phoneNumber; - String projectImageURL; + String? latitude; + int? locationType; + String? longitude; + String? phoneNumber; + String? projectImageURL; Null sortOrder; PharmacyPrescriptions( diff --git a/lib/core/model/prescriptions/prescription_info_rc_model.dart b/lib/core/model/prescriptions/prescription_info_rc_model.dart index 23c4ad55..fffb9bdd 100644 --- a/lib/core/model/prescriptions/prescription_info_rc_model.dart +++ b/lib/core/model/prescriptions/prescription_info_rc_model.dart @@ -1,13 +1,13 @@ class PrescriptionInfoRCModel { - String itemDescription; - String image; - String sKU; + String? itemDescription; + String? image; + String? sKU; dynamic productId; dynamic productName; - int quantity; - int orderId; - int totalPrice; - int dispenseQuantity; + int? quantity; + int? orderId; + int? totalPrice; + int? dispenseQuantity; dynamic itemhand; PrescriptionInfoRCModel( diff --git a/lib/core/model/prescriptions/prescription_report.dart b/lib/core/model/prescriptions/prescription_report.dart index adad640e..b4a3e0b7 100644 --- a/lib/core/model/prescriptions/prescription_report.dart +++ b/lib/core/model/prescriptions/prescription_report.dart @@ -1,50 +1,50 @@ class PrescriptionReport { - String address; - int appointmentNo; - String clinic; - String companyName; - int days; - String doctorName; - num doseDailyQuantity; - String frequency; - int frequencyNumber; - String image; - String imageExtension; - String imageSRCUrl; - String imageString; - String imageThumbUrl; - String isCovered; - String itemDescription; - int itemID; - String orderDate; - int patientID; - String patientName; - String phoneOffice1; - String prescriptionQR; - num prescriptionTimes; - String productImage; - String productImageBase64; - String productImageString; - int projectID; - String projectName; - String remarks; - String route; - String sKU; - int scaleOffset; - String startDate; + String? address; + int? appointmentNo; + String? clinic; + String? companyName; + int? days; + String? doctorName; + num? doseDailyQuantity; + String? frequency; + int? frequencyNumber; + String? image; + String? imageExtension; + String? imageSRCUrl; + String? imageString; + String? imageThumbUrl; + String? isCovered; + String? itemDescription; + int? itemID; + String? orderDate; + int? patientID; + String? patientName; + String? phoneOffice1; + String? prescriptionQR; + num? prescriptionTimes; + String? productImage; + String? productImageBase64; + String? productImageString; + int? projectID; + String? projectName; + String? remarks; + String? route; + String? sKU; + int? scaleOffset; + String? startDate; - String patientAge; - String patientGender; - String phoneOffice; - int doseTimingID; - int frequencyID; - int routeID; - String name; - String itemDescriptionN; - String routeN; - String frequencyN; + String? patientAge; + String? patientGender; + String? phoneOffice; + int? doseTimingID; + int? frequencyID; + int? routeID; + String? name; + String? itemDescriptionN; + String? routeN; + String? frequencyN; PrescriptionReport({ this.address, diff --git a/lib/core/model/prescriptions/prescription_report_enh.dart b/lib/core/model/prescriptions/prescription_report_enh.dart index a07a30c4..f3ada2d0 100644 --- a/lib/core/model/prescriptions/prescription_report_enh.dart +++ b/lib/core/model/prescriptions/prescription_report_enh.dart @@ -1,38 +1,38 @@ class PrescriptionReportEnh { - String address; - int appointmentNo; - String clinic; + String? address; + int? appointmentNo; + String? clinic; Null companyName; - int days; - String doctorName; - num doseDailyQuantity; - String frequency; - int frequencyNumber; + int? days; + String? doctorName; + num? doseDailyQuantity; + String? frequency; + int? frequencyNumber; Null image; Null imageExtension; - String imageSRCUrl; + String? imageSRCUrl; Null imageString; - String imageThumbUrl; - String isCovered; - String itemDescription; - String itemDescriptionN; - int itemID; - String orderDate; - int patientID; - String patientName; - String phoneOffice1; + String? imageThumbUrl; + String? isCovered; + String? itemDescription; + String? itemDescriptionN; + int? itemID; + String? orderDate; + int? patientID; + String? patientName; + String? phoneOffice1; Null prescriptionQR; - num prescriptionTimes; + num? prescriptionTimes; Null productImage; Null productImageBase64; - String productImageString; - int projectID; - String projectName; - String remarks; - String route; - String sKU; - int scaleOffset; - String startDate; + String? productImageString; + int? projectID; + String? projectName; + String? remarks; + String? route; + String? sKU; + int? scaleOffset; + String? startDate; PrescriptionReportEnh( {this.address, diff --git a/lib/core/model/prescriptions/prescription_report_inp.dart b/lib/core/model/prescriptions/prescription_report_inp.dart index b802337b..cd44826e 100644 --- a/lib/core/model/prescriptions/prescription_report_inp.dart +++ b/lib/core/model/prescriptions/prescription_report_inp.dart @@ -1,32 +1,32 @@ class PrescriptionReportINP { - int patientID; - String patientName; - String patientAge; - String patientGender; - String address; - String phoneOffice; - String itemDescription; - int doseTimingID; - int frequencyID; - int routeID; - String clinic; - String doctorName; - String route; - String frequency; - String remarks; - String name; - int days; - String startDate; - String orderDate; - int doseDailyQuantity; - int itemID; + int? patientID; + String? patientName; + String? patientAge; + String? patientGender; + String? address; + String? phoneOffice; + String? itemDescription; + int? doseTimingID; + int? frequencyID; + int? routeID; + String? clinic; + String? doctorName; + String? route; + String? frequency; + String? remarks; + String? name; + int? days; + String? startDate; + String? orderDate; + int? doseDailyQuantity; + int? itemID; Null productImage; - String sKU; - String itemDescriptionN; - String routeN; - String frequencyN; - String imageSRCUrl; - String imageThumbUrl; + String? sKU; + String? itemDescriptionN; + String? routeN; + String? frequencyN; + String? imageSRCUrl; + String? imageThumbUrl; PrescriptionReportINP( {this.patientID, diff --git a/lib/core/model/prescriptions/prescriptions_order.dart b/lib/core/model/prescriptions/prescriptions_order.dart index fe4239ba..1241ea15 100644 --- a/lib/core/model/prescriptions/prescriptions_order.dart +++ b/lib/core/model/prescriptions/prescriptions_order.dart @@ -3,32 +3,32 @@ import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; class PrescriptionsOrder { - int iD; + int? iD; dynamic patientID; - bool patientOutSA; - bool isOutPatient; - int projectID; - int nearestProjectID; - double longitude; - double latitude; + bool? patientOutSA; + bool? isOutPatient; + int? projectID; + int? nearestProjectID; + double? longitude; + double? latitude; dynamic appointmentNo; dynamic dischargeID; - int lineItemNo; - int status; + int? lineItemNo; + int? status; dynamic description; dynamic descriptionN; - DateTime createdOn; - int serviceID; - int createdBy; - DateTime editedOn; - int editedBy; - int channel; + DateTime? createdOn; + int? serviceID; + int? createdBy; + DateTime? editedOn; + int? editedBy; + int? channel; dynamic clientRequestID; - bool returnedToQueue; + bool? returnedToQueue; dynamic pickupDateTime; dynamic pickupLocationName; dynamic dropoffLocationName; - int realRRTHaveTransactions; + int? realRRTHaveTransactions; dynamic nearestProjectDescription; dynamic nearestProjectDescriptionN; dynamic projectDescription; @@ -45,7 +45,7 @@ class PrescriptionsOrder { return '$status'; } - String getFormattedDateTime()=> DateUtil.getWeekDayMonthDayYearDateFormatted(createdOn, isAppArabic ? 'ar' : 'en'); + String getFormattedDateTime()=> DateUtil.getWeekDayMonthDayYearDateFormatted(createdOn!, isAppArabic ? 'ar' : 'en'); PrescriptionsOrder( {this.iD, diff --git a/lib/core/model/prescriptions/request_get_list_pharmacy_for_prescriptions.dart b/lib/core/model/prescriptions/request_get_list_pharmacy_for_prescriptions.dart index 4b099f5b..b870a617 100644 --- a/lib/core/model/prescriptions/request_get_list_pharmacy_for_prescriptions.dart +++ b/lib/core/model/prescriptions/request_get_list_pharmacy_for_prescriptions.dart @@ -1,16 +1,16 @@ class RequestGetListPharmacyForPrescriptions { dynamic latitude; dynamic longitude; - double versionID; - int channel; - int languageID; - String iPAdress; - String generalid; - int patientOutSA; - String sessionID; - bool isDentalAllowedBackend; - int deviceTypeID; - int itemID; + double? versionID; + int? channel; + int? languageID; + String? iPAdress; + String? generalid; + int? patientOutSA; + String? sessionID; + bool? isDentalAllowedBackend; + int? deviceTypeID; + int? itemID; RequestGetListPharmacyForPrescriptions( {this.latitude, diff --git a/lib/core/model/prescriptions/request_prescription_report.dart b/lib/core/model/prescriptions/request_prescription_report.dart index c8323740..73b6655c 100644 --- a/lib/core/model/prescriptions/request_prescription_report.dart +++ b/lib/core/model/prescriptions/request_prescription_report.dart @@ -1,44 +1,44 @@ class RequestPrescriptionReport { - 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 appointmentNo; - String setupID; - int episodeID; - int clinicID; - int projectID; - int dischargeNo; + 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? appointmentNo; + String? setupID; + int? episodeID; + int? clinicID; + int? projectID; + int? dischargeNo; RequestPrescriptionReport( {this.versionID, - this.channel, - this.languageID, - this.iPAdress, - this.generalid, - this.patientOutSA, - this.sessionID, - this.isDentalAllowedBackend, - this.deviceTypeID, - this.patientID, - this.tokenID, - this.patientTypeID, - this.patientType, - this.appointmentNo, - this.setupID, - this.episodeID, - this.clinicID, - this.projectID, - this.dischargeNo}); + this.channel, + this.languageID, + this.iPAdress, + this.generalid, + this.patientOutSA, + this.sessionID, + this.isDentalAllowedBackend, + this.deviceTypeID, + this.patientID, + this.tokenID, + this.patientTypeID, + this.patientType, + this.appointmentNo, + this.setupID, + this.episodeID, + this.clinicID, + this.projectID, + this.dischargeNo}); RequestPrescriptionReport.fromJson(Map json) { versionID = json['VersionID']; diff --git a/lib/core/model/prescriptions/request_prescription_report_enh.dart b/lib/core/model/prescriptions/request_prescription_report_enh.dart index 4905fc2a..81cdeae3 100644 --- a/lib/core/model/prescriptions/request_prescription_report_enh.dart +++ b/lib/core/model/prescriptions/request_prescription_report_enh.dart @@ -1,23 +1,23 @@ class RequestPrescriptionReportEnh { - 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 appointmentNo; - String setupID; - int dischargeNo; - int episodeID; - int clinicID; - int projectID; + 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? appointmentNo; + String? setupID; + int? dischargeNo; + int? episodeID; + int? clinicID; + int? projectID; RequestPrescriptionReportEnh( {this.versionID, diff --git a/lib/core/model/prescriptions/request_prescriptions.dart b/lib/core/model/prescriptions/request_prescriptions.dart index abb39143..605ba800 100644 --- a/lib/core/model/prescriptions/request_prescriptions.dart +++ b/lib/core/model/prescriptions/request_prescriptions.dart @@ -1,17 +1,17 @@ class RequestPrescriptions { - 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; + 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; RequestPrescriptions( {this.versionID, diff --git a/lib/core/model/prescriptions/request_prescriptions_orders.dart b/lib/core/model/prescriptions/request_prescriptions_orders.dart index 9aaab33d..73b877b4 100644 --- a/lib/core/model/prescriptions/request_prescriptions_orders.dart +++ b/lib/core/model/prescriptions/request_prescriptions_orders.dart @@ -1,14 +1,14 @@ class RequestPrescriptionsOrders { - int patientID; - int patientOutSA; - double versionID; - int channel; - int languageID; - String iPAdress; - String generalid; - String sessionID; - bool isDentalAllowedBackend; - int deviceTypeID; + int? patientID; + int? patientOutSA; + double? versionID; + int? channel; + int? languageID; + String? iPAdress; + String? generalid; + String? sessionID; + bool? isDentalAllowedBackend; + int? deviceTypeID; RequestPrescriptionsOrders( {this.patientID, diff --git a/lib/core/model/prescriptions/request_send_prescription_email.dart b/lib/core/model/prescriptions/request_send_prescription_email.dart index ecd0f36d..aff0e792 100644 --- a/lib/core/model/prescriptions/request_send_prescription_email.dart +++ b/lib/core/model/prescriptions/request_send_prescription_email.dart @@ -1,31 +1,31 @@ import 'package:diplomaticquarterapp/core/model/prescriptions/prescription_report.dart'; class RequestSendPrescriptionEmail { - String appointmentDate; - 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; - String to; - String dateofBirth; - String patientIditificationNum; - String patientMobileNumber; - String patientName; - String setupID; - String clinicName; - String doctorName; - int doctorID; - int projectID; - List listPrescriptions; + String? appointmentDate; + 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; + String? to; + String? dateofBirth; + String? patientIditificationNum; + String? patientMobileNumber; + String? patientName; + String? setupID; + String? clinicName; + String? doctorName; + int? doctorID; + int? projectID; + List? listPrescriptions; RequestSendPrescriptionEmail( {this.appointmentDate, @@ -103,8 +103,7 @@ class RequestSendPrescriptionEmail { data['PatientName'] = this.patientName; data['SetupID'] = this.setupID; if (this.listPrescriptions != null) { - data['ListPrescriptions'] = - this.listPrescriptions.map((v) => v.toJson()).toList(); + data['ListPrescriptions'] = this.listPrescriptions!.map((v) => v.toJson()).toList(); } data['ClinicName'] = this.clinicName; data['DoctorName'] = this.doctorName; diff --git a/lib/core/model/privilege/PrivilegeModel.dart b/lib/core/model/privilege/PrivilegeModel.dart index 3b629fde..587490b7 100644 --- a/lib/core/model/privilege/PrivilegeModel.dart +++ b/lib/core/model/privilege/PrivilegeModel.dart @@ -1,7 +1,7 @@ class PrivilegeModel { - int iD; - String serviceName; - bool privilege; + int? iD; + String? serviceName; + bool? privilege; dynamic region; PrivilegeModel({this.iD, this.serviceName, this.privilege, this.region}); diff --git a/lib/core/model/privilege/VidaPlusProjectListModel.dart b/lib/core/model/privilege/VidaPlusProjectListModel.dart index e56b82db..75978110 100644 --- a/lib/core/model/privilege/VidaPlusProjectListModel.dart +++ b/lib/core/model/privilege/VidaPlusProjectListModel.dart @@ -1,5 +1,5 @@ class VidaPlusProjectListModel { - int projectID; + int? projectID; VidaPlusProjectListModel({this.projectID}); diff --git a/lib/core/model/qr/qr_parking_model.dart b/lib/core/model/qr/qr_parking_model.dart index 1df927bc..fa3b1175 100644 --- a/lib/core/model/qr/qr_parking_model.dart +++ b/lib/core/model/qr/qr_parking_model.dart @@ -1,86 +1,86 @@ class QRParkingModel { Null totalRecords; Null nRowID; - int qRParkingID; - String description; - String descriptionN; + int? qRParkingID; + String? description; + String? descriptionN; Null qRCompare; Null qRValue; - String imagePath; - bool isActive; - int parkingID; - int branchID; - int companyID; - int buildingID; - int rowID; - int gateID; - int floorID; + String? imagePath; + bool? isActive; + int? parkingID; + int? branchID; + int? companyID; + int? buildingID; + int? rowID; + int? gateID; + int? floorID; Null imagePath1; - int createdBy; - String createdOn; + int? createdBy; + String? createdOn; Null editedBy; Null editedOn; - String parkingDescription; - String parkingDescriptionN; - String gateDescription; - String gateDescriptionN; - String branchDescription; - String branchDescriptionN; - String companyDescription; - String companyDescriptionN; - String rowDescription; - String rowDescriptionN; - String floorDescription; - String floorDescriptionN; - String buildingDescription; - String buildingDescriptionN; - String qRParkingCode; - String parkingCode; - double latitude; - double longitude; - String qRImageStr; + String? parkingDescription; + String? parkingDescriptionN; + String? gateDescription; + String? gateDescriptionN; + String? branchDescription; + String? branchDescriptionN; + String? companyDescription; + String? companyDescriptionN; + String? rowDescription; + String? rowDescriptionN; + String? floorDescription; + String? floorDescriptionN; + String? buildingDescription; + String? buildingDescriptionN; + String? qRParkingCode; + String? parkingCode; + double? latitude; + double? longitude; + String? qRImageStr; QRParkingModel( {this.totalRecords, - this.nRowID, - this.qRParkingID, - this.description, - this.descriptionN, - this.qRCompare, - this.qRValue, - this.imagePath, - this.isActive, - this.parkingID, - this.branchID, - this.companyID, - this.buildingID, - this.rowID, - this.gateID, - this.floorID, - this.imagePath1, - this.createdBy, - this.createdOn, - this.editedBy, - this.editedOn, - this.parkingDescription, - this.parkingDescriptionN, - this.gateDescription, - this.gateDescriptionN, - this.branchDescription, - this.branchDescriptionN, - this.companyDescription, - this.companyDescriptionN, - this.rowDescription, - this.rowDescriptionN, - this.floorDescription, - this.floorDescriptionN, - this.buildingDescription, - this.buildingDescriptionN, - this.qRParkingCode, - this.parkingCode, - this.latitude, - this.longitude, - this.qRImageStr}); + this.nRowID, + this.qRParkingID, + this.description, + this.descriptionN, + this.qRCompare, + this.qRValue, + this.imagePath, + this.isActive, + this.parkingID, + this.branchID, + this.companyID, + this.buildingID, + this.rowID, + this.gateID, + this.floorID, + this.imagePath1, + this.createdBy, + this.createdOn, + this.editedBy, + this.editedOn, + this.parkingDescription, + this.parkingDescriptionN, + this.gateDescription, + this.gateDescriptionN, + this.branchDescription, + this.branchDescriptionN, + this.companyDescription, + this.companyDescriptionN, + this.rowDescription, + this.rowDescriptionN, + this.floorDescription, + this.floorDescriptionN, + this.buildingDescription, + this.buildingDescriptionN, + this.qRParkingCode, + this.parkingCode, + this.latitude, + this.longitude, + this.qRImageStr}); QRParkingModel.fromJson(Map json) { totalRecords = json['TotalRecords']; diff --git a/lib/core/model/radiology/final_radiology.dart b/lib/core/model/radiology/final_radiology.dart index d92ffead..45c3ebdf 100644 --- a/lib/core/model/radiology/final_radiology.dart +++ b/lib/core/model/radiology/final_radiology.dart @@ -1,48 +1,48 @@ import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; class FinalRadiology { - String setupID; - int projectID; + String? setupID; + int? projectID; dynamic patientID; - int invoiceLineItemNo; - int invoiceNo; + int? invoiceLineItemNo; + int? invoiceNo; dynamic invoiceNo_VP; - int doctorID; - int clinicID; - DateTime orderDate; - String reportData; - String imageURL; - String procedureID; - int appointmentNo; + int? doctorID; + int? clinicID; + DateTime? orderDate; + String? reportData; + String? imageURL; + String? procedureID; + int? appointmentNo; Null dIAPacsURL; - bool isRead; - String readOn; + bool? isRead; + String? readOn; var admissionNo; - bool isInOutPatient; - int actualDoctorRate; - String clinicDescription; - String dIAPACSURL; - String doctorImageURL; - String doctorName; - int doctorRate; - String doctorTitle; - int gender; - String genderDescription; - bool isActiveDoctorProfile; - bool isExecludeDoctor; - String isInOutPatientDescription; - String isInOutPatientDescriptionN; - String nationalityFlagURL; - int noOfPatientsRate; - int orderNo; - String projectName; - String qR; - String reportDataHTML; - String reportDataTextString; - List speciality; - bool isCVI; - bool isRadMedicalReport; - bool isLiveCareAppointment; + bool? isInOutPatient; + int? actualDoctorRate; + String? clinicDescription; + String? dIAPACSURL; + String? doctorImageURL; + String? doctorName; + int? doctorRate; + String? doctorTitle; + int? gender; + String? genderDescription; + bool? isActiveDoctorProfile; + bool? isExecludeDoctor; + String? isInOutPatientDescription; + String? isInOutPatientDescriptionN; + String? nationalityFlagURL; + int? noOfPatientsRate; + int? orderNo; + String? projectName; + String? qR; + String? reportDataHTML; + String? reportDataTextString; + List? speciality; + bool? isCVI; + bool? isRadMedicalReport; + bool? isLiveCareAppointment; FinalRadiology( {this.setupID, @@ -50,7 +50,7 @@ class FinalRadiology { this.patientID, this.invoiceLineItemNo, this.invoiceNo, - this.invoiceNo_VP, + this.invoiceNo_VP, this.doctorID, this.clinicID, this.orderDate, @@ -85,7 +85,8 @@ class FinalRadiology { this.reportDataTextString, this.speciality, this.isCVI, - this.isRadMedicalReport,this.isLiveCareAppointment}); + this.isRadMedicalReport, + this.isLiveCareAppointment}); FinalRadiology.fromJson(Map json) { try { @@ -128,10 +129,9 @@ class FinalRadiology { isLiveCareAppointment = json['IsLiveCareAppointment']; reportDataHTML = json['ReportDataHTML']; reportDataTextString = json['ReportDataTextString']; - // speciality = json['Speciality'].cast(); + // speciality = json['Speciality'].cast(); isCVI = json['isCVI']; isRadMedicalReport = json['isRadMedicalReport']; - } catch (e) { print(e); } @@ -185,11 +185,11 @@ class FinalRadiology { } class FinalRadiologyList { - String filterName = ""; - List finalRadiologyList = List(); + String? filterName = ""; + List? finalRadiologyList = []; FinalRadiologyList({this.filterName, this.finalRadiologyList}); - // { - // finalRadiologyList.add(finalRadiology); - // } +// { +// finalRadiologyList.add(finalRadiology); +// } } diff --git a/lib/core/model/radiology/request_patient_rad_orders_details.dart b/lib/core/model/radiology/request_patient_rad_orders_details.dart index 9e3458d5..bd90193b 100644 --- a/lib/core/model/radiology/request_patient_rad_orders_details.dart +++ b/lib/core/model/radiology/request_patient_rad_orders_details.dart @@ -1,46 +1,46 @@ class RequestPatientRadOrdersDetails { - int projectID; - int orderNo; - int invoiceNo; - String setupID; - String procedureID; - bool isMedicalReport; - bool isCVI; - 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? projectID; + int? orderNo; + int? invoiceNo; + String? setupID; + String? procedureID; + bool? isMedicalReport; + bool? isCVI; + 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; RequestPatientRadOrdersDetails( {this.projectID, - this.orderNo, - this.invoiceNo, - this.setupID, - this.procedureID, - this.isMedicalReport, - this.isCVI, - this.versionID, - this.channel, - this.languageID, - this.iPAdress, - this.generalid, - this.patientOutSA, - this.sessionID, - this.isDentalAllowedBackend, - this.deviceTypeID, - this.patientID, - this.tokenID, - this.patientTypeID, - this.patientType}); + this.orderNo, + this.invoiceNo, + this.setupID, + this.procedureID, + this.isMedicalReport, + this.isCVI, + this.versionID, + this.channel, + this.languageID, + this.iPAdress, + this.generalid, + this.patientOutSA, + this.sessionID, + this.isDentalAllowedBackend, + this.deviceTypeID, + this.patientID, + this.tokenID, + this.patientTypeID, + this.patientType}); RequestPatientRadOrdersDetails.fromJson(Map json) { projectID = json['ProjectID']; diff --git a/lib/core/model/radiology/request_send_rad_report_email.dart b/lib/core/model/radiology/request_send_rad_report_email.dart index 6819de0d..47b84a8a 100644 --- a/lib/core/model/radiology/request_send_rad_report_email.dart +++ b/lib/core/model/radiology/request_send_rad_report_email.dart @@ -1,61 +1,61 @@ class RequestSendRadReportEmail { - int channel; - String clinicName; - String dateofBirth; - int deviceTypeID; - String doctorName; - String generalid; - int invoiceNo; - int invoiceNo_VP; - String iPAdress; - bool isDentalAllowedBackend; - int languageID; - String orderDate; - int patientID; - String patientIditificationNum; - String patientMobileNumber; - String patientName; - int patientOutSA; - int patientType; - int patientTypeID; - int projectID; - String projectName; - String radResult; - String sessionID; - String setupID; - String to; - String tokenID; - double versionID; - int invoiceLineItemNo; + int? channel; + String? clinicName; + String? dateofBirth; + int? deviceTypeID; + String? doctorName; + String? generalid; + int? invoiceNo; + int? invoiceNo_VP; + String? iPAdress; + bool? isDentalAllowedBackend; + int? languageID; + String? orderDate; + int? patientID; + String? patientIditificationNum; + String? patientMobileNumber; + String? patientName; + int? patientOutSA; + int? patientType; + int? patientTypeID; + int? projectID; + String? projectName; + String? radResult; + String? sessionID; + String? setupID; + String? to; + String? tokenID; + double? versionID; + int? invoiceLineItemNo; RequestSendRadReportEmail( {this.channel, - this.clinicName, - this.dateofBirth, - this.deviceTypeID, - this.doctorName, - this.generalid, - this.invoiceNo, - this.invoiceNo_VP, - this.iPAdress, - this.isDentalAllowedBackend, - this.languageID, - this.orderDate, - this.patientID, - this.patientIditificationNum, - this.patientMobileNumber, - this.patientName, - this.patientOutSA, - this.patientType, - this.patientTypeID, - this.projectID, - this.projectName, - this.radResult, - this.sessionID, - this.setupID, - this.to, - this.tokenID, - this.versionID}); + this.clinicName, + this.dateofBirth, + this.deviceTypeID, + this.doctorName, + this.generalid, + this.invoiceNo, + this.invoiceNo_VP, + this.iPAdress, + this.isDentalAllowedBackend, + this.languageID, + this.orderDate, + this.patientID, + this.patientIditificationNum, + this.patientMobileNumber, + this.patientName, + this.patientOutSA, + this.patientType, + this.patientTypeID, + this.projectID, + this.projectName, + this.radResult, + this.sessionID, + this.setupID, + this.to, + this.tokenID, + this.versionID}); RequestSendRadReportEmail.fromJson(Map json) { channel = json['Channel']; diff --git a/lib/core/model/rate/appointment_details.dart b/lib/core/model/rate/appointment_details.dart index 77d759db..2900bced 100644 --- a/lib/core/model/rate/appointment_details.dart +++ b/lib/core/model/rate/appointment_details.dart @@ -1,10 +1,10 @@ class AppointmentDetails { - String setupID; - int projectID; - int patientID; - int appointmentNo; - int clinicID; - int doctorID; + String? setupID; + int? projectID; + int? patientID; + int? appointmentNo; + int? clinicID; + int? doctorID; dynamic startTime; dynamic endTime; dynamic appointmentDate; diff --git a/lib/core/model/rate/appointment_rate.dart b/lib/core/model/rate/appointment_rate.dart index abb249f4..91070f29 100644 --- a/lib/core/model/rate/appointment_rate.dart +++ b/lib/core/model/rate/appointment_rate.dart @@ -1,26 +1,26 @@ class AppointmentRate { - int rate; - int appointmentNo; - int projectID; - int doctorID; - int clinicID; - String note; - String mobileNumber; - int createdBy; - int editedBy; - 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? rate; + int? appointmentNo; + int? projectID; + int? doctorID; + int? clinicID; + String? note; + String? mobileNumber; + int? createdBy; + int? editedBy; + 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; AppointmentRate( {this.rate, diff --git a/lib/core/model/rate/appoitment_rated.dart b/lib/core/model/rate/appoitment_rated.dart index 95358b23..23a0b836 100644 --- a/lib/core/model/rate/appoitment_rated.dart +++ b/lib/core/model/rate/appoitment_rated.dart @@ -1,40 +1,40 @@ class AppoitmentRated { - String setupID; - int projectID; - int appointmentNo; - String appointmentDate; - String 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 confirmedBy; - String confirmedOn; - int arrivalChangedBy; - String arrivedOn; - int editedBy; - String editedOn; + String? setupID; + int? projectID; + int? appointmentNo; + String? appointmentDate; + String? 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? confirmedBy; + String? confirmedOn; + int? arrivalChangedBy; + String? arrivedOn; + int? editedBy; + String? editedOn; Null doctorName; - String doctorNameN; - String statusDesc; - String statusDescN; - bool vitalStatus; + String? doctorNameN; + String? statusDesc; + String? statusDescN; + bool? vitalStatus; Null vitalSignAppointmentNo; - int episodeID; - String doctorTitle; - bool isAppoitmentLiveCare; + int? episodeID; + String? doctorTitle; + bool? isAppoitmentLiveCare; AppoitmentRated( {this.setupID, diff --git a/lib/core/model/reports/Reports.dart b/lib/core/model/reports/Reports.dart index 6791a3d4..e86aa554 100644 --- a/lib/core/model/reports/Reports.dart +++ b/lib/core/model/reports/Reports.dart @@ -1,33 +1,33 @@ import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; class Reports { - int status; - DateTime encounterDate; - int projectID; - int invoiceNo; - int encounterNo; - String procedureId; - int requestType; - String setupId; - int patientID; - int doctorID; + int? status; + DateTime? encounterDate; + int? projectID; + int? invoiceNo; + int? encounterNo; + String? procedureId; + int? requestType; + String? setupId; + int? patientID; + int? doctorID; dynamic clinicID; - DateTime requestDate; - bool isRead; - DateTime isReadOn; - int actualDoctorRate; - String clinicDescription; + DateTime? requestDate; + bool? isRead; + DateTime? isReadOn; + int? actualDoctorRate; + String? clinicDescription; dynamic clinicDescriptionN; - String docName; + String? docName; Null docNameN; - String doctorImageURL; + String? doctorImageURL; dynamic doctorName; dynamic doctorNameN; - int doctorRate; - bool isDoctorAllowVedioCall; - bool isExecludeDoctor; - int noOfPatientsRate; - String projectName; + int? doctorRate; + bool? isDoctorAllowVedioCall; + bool? isExecludeDoctor; + int? noOfPatientsRate; + String? projectName; dynamic projectNameN; Reports( @@ -133,11 +133,11 @@ class Reports { } class ReportsList { - String filterName = ""; + String? filterName = ""; - List reportsList = List(); + List reportsList =[]; - ReportsList({this.filterName, Reports reports}) { - reportsList.add(reports); + ReportsList({this.filterName, Reports? reports}) { + reportsList.add(reports!); } } diff --git a/lib/core/model/reports/admission_for_medical_report.dart b/lib/core/model/reports/admission_for_medical_report.dart index a185762d..a807b2fe 100644 --- a/lib/core/model/reports/admission_for_medical_report.dart +++ b/lib/core/model/reports/admission_for_medical_report.dart @@ -1,58 +1,58 @@ class AdmissionMedicalReport { - int rowID; - String setupID; - int projectID; - int admissionNo; - String admissionDate; - int admissionRequestNo; - int admissionType; - int patientType; - int patientID; - int clinicID; - int doctorID; - int admittingClinicID; - int admittingDoctorID; - int categoryID; - String roomID; - String bedID; - String dischargeDate; - int approvalNo; + int? rowID; + String? setupID; + int? projectID; + int? admissionNo; + String? admissionDate; + int? admissionRequestNo; + int? admissionType; + int? patientType; + int? patientID; + int? clinicID; + int? doctorID; + int? admittingClinicID; + int? admittingDoctorID; + int? categoryID; + String? roomID; + String? bedID; + String? dischargeDate; + int? approvalNo; dynamic relativeID; - String registrationDate; - String firstName; - String middleName; - String lastName; - String firstNameN; - String middleNameN; - String lastNameN; - int patientCategory; - int gender; - String dateofBirth; - String dateofBirthN; - String nationalityID; - String firstVisit; - String lastVisit; - int noOfVisit; - String mobileNumber; - String patientIdentificationNo; - int sTATUS; - int admissionStatus; - int buildingID; - String buildingDescription; - String buildingDescriptionN; - int floorID; - int bedGender; - int tariffType; + String? registrationDate; + String? firstName; + String? middleName; + String? lastName; + String? firstNameN; + String? middleNameN; + String? lastNameN; + int? patientCategory; + int? gender; + String? dateofBirth; + String? dateofBirthN; + String? nationalityID; + String? firstVisit; + String? lastVisit; + int? noOfVisit; + String? mobileNumber; + String? patientIdentificationNo; + int? sTATUS; + int? admissionStatus; + int? buildingID; + String? buildingDescription; + String? buildingDescriptionN; + int? floorID; + int? bedGender; + int? tariffType; dynamic cRSVerificationStatus; - String nursingStationID; - String description; - String clinicName; - String doctorNameObj; - int patientDataVerified; - String projectName; + String? nursingStationID; + String? description; + String? clinicName; + String? doctorNameObj; + int? patientDataVerified; + String? projectName; dynamic projectNameN; - String statusDescription; - String statusDescriptionN; + String? statusDescription; + String? statusDescriptionN; AdmissionMedicalReport( {this.rowID, diff --git a/lib/core/model/reports/request_report_history.dart b/lib/core/model/reports/request_report_history.dart index f7d02cc5..d3bf22cf 100644 --- a/lib/core/model/reports/request_report_history.dart +++ b/lib/core/model/reports/request_report_history.dart @@ -1,20 +1,20 @@ class RequestReportHistory { - int projectID; - int clinicID; - bool isForMedicalReport; - 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? projectID; + int? clinicID; + bool? isForMedicalReport; + 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; RequestReportHistory( {this.projectID, diff --git a/lib/core/model/reports/request_reports.dart b/lib/core/model/reports/request_reports.dart index 9bb44280..045f76b6 100644 --- a/lib/core/model/reports/request_reports.dart +++ b/lib/core/model/reports/request_reports.dart @@ -1,21 +1,21 @@ class RequestReports { - bool isReport; - int encounterType; - int requestType; - 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 projectID; + bool? isReport; + int? encounterType; + int? requestType; + 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? projectID; RequestReports( {this.isReport, diff --git a/lib/core/model/search_products_model.dart b/lib/core/model/search_products_model.dart index d63fd4b0..30444e56 100644 --- a/lib/core/model/search_products_model.dart +++ b/lib/core/model/search_products_model.dart @@ -1,32 +1,32 @@ class SearchProductsModel { - String id; - String name; - String namen; - List localizedNames; - String shortDescription; - String fullDescription; - String fullDescriptionn; + String? id; + String? name; + String? namen; + List? localizedNames; + String? shortDescription; + String? fullDescription; + String? fullDescriptionn; dynamic approvedRatingSum; dynamic approvedTotalReviews; - String sku; - bool isRx; + String? sku; + bool? isRx; dynamic rxMessage; dynamic rxMessagen; dynamic stockQuantity; - String stockAvailability; - String stockAvailabilityn; - bool allowBackInStockSubscriptions; + String? stockAvailability; + String? stockAvailabilityn; + bool? allowBackInStockSubscriptions; dynamic orderMinimumQuantity; dynamic orderMaximumQuantity; - double price; + double? price; dynamic oldPrice; dynamic discountName; dynamic discountNamen; dynamic discountPercentage; dynamic displayOrder; - List discountIds; - List reviews; - List images; + List? discountIds; + List? reviews; + List? images; SearchProductsModel( {this.id, @@ -63,9 +63,9 @@ class SearchProductsModel { name = json['name']; namen = json['namen']; if (json['localized_names'] != null) { - localizedNames = new List(); + localizedNames = []; json['localized_names'].forEach((v) { - localizedNames.add(new LocalizedNames.fromJson(v)); + localizedNames!.add(new LocalizedNames.fromJson(v)); }); } shortDescription = json['short_description']; @@ -91,9 +91,9 @@ class SearchProductsModel { displayOrder = json['display_order']; if (json['images'] != null) { - images = new List(); + images = []; json['images'].forEach((v) { - images.add(new Images.fromJson(v)); + images!.add(new Images.fromJson(v)); }); } } @@ -104,8 +104,7 @@ class SearchProductsModel { data['name'] = this.name; data['namen'] = this.namen; if (this.localizedNames != null) { - data['localized_names'] = - this.localizedNames.map((v) => v.toJson()).toList(); + data['localized_names'] = this.localizedNames!.map((v) => v.toJson()).toList(); } data['short_description'] = this.shortDescription; data['full_description'] = this.fullDescription; @@ -119,8 +118,7 @@ class SearchProductsModel { data['stock_quantity'] = this.stockQuantity; data['stock_availability'] = this.stockAvailability; data['stock_availabilityn'] = this.stockAvailabilityn; - data['allow_back_in_stock_subscriptions'] = - this.allowBackInStockSubscriptions; + data['allow_back_in_stock_subscriptions'] = this.allowBackInStockSubscriptions; data['order_minimum_quantity'] = this.orderMinimumQuantity; data['order_maximum_quantity'] = this.orderMaximumQuantity; data['price'] = this.price; @@ -131,15 +129,15 @@ class SearchProductsModel { data['display_order'] = this.displayOrder; if (this.images != null) { - data['images'] = this.images.map((v) => v.toJson()).toList(); + data['images'] = this.images!.map((v) => v.toJson()).toList(); } return data; } } class LocalizedNames { - int languageId; - String localizedName; + int? languageId; + String? localizedName; LocalizedNames({this.languageId, this.localizedName}); @@ -157,11 +155,11 @@ class LocalizedNames { } class Images { - int id; - int position; - String src; - String thumb; - String attachment; + int? id; + int? position; + String? src; + String? thumb; + String? attachment; Images({this.id, this.position, this.src, this.thumb, this.attachment}); diff --git a/lib/core/model/sick_leave/admission_status_for_sick_leave.dart b/lib/core/model/sick_leave/admission_status_for_sick_leave.dart index e4ee923c..9532a5dd 100644 --- a/lib/core/model/sick_leave/admission_status_for_sick_leave.dart +++ b/lib/core/model/sick_leave/admission_status_for_sick_leave.dart @@ -1,16 +1,16 @@ class AdmissionStatusForSickLeave { - String setupID; - int projectID; - int patientID; - int patientType; - int requestNo; - String requestDate; - int sickLeaveDays; - int appointmentNo; - int admissionNo; - String reportDate; - String placeOfWork; - int status; + String? setupID; + int? projectID; + int? patientID; + int? patientType; + int? requestNo; + String? requestDate; + int? sickLeaveDays; + int? appointmentNo; + int? admissionNo; + String? reportDate; + String? placeOfWork; + int? status; dynamic dischargeDate; AdmissionStatusForSickLeave( diff --git a/lib/core/model/sick_leave/sick_leave.dart b/lib/core/model/sick_leave/sick_leave.dart index 10862230..6658d3b6 100644 --- a/lib/core/model/sick_leave/sick_leave.dart +++ b/lib/core/model/sick_leave/sick_leave.dart @@ -1,39 +1,39 @@ import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; class SickLeave { - String setupID; - int projectID; - int patientID; - int patientType; - int clinicID; - int doctorID; - int requestNo; - DateTime requestDate; - int sickLeaveDays; - int appointmentNo; - int admissionNo; - int actualDoctorRate; - DateTime appointmentDate; - String clinicName; - String doctorImageURL; - String doctorName; - int doctorRate; - String doctorTitle; - int gender; - String genderDescription; - bool isActiveDoctorProfile; - bool isDoctorAllowVedioCall; - bool isExecludeDoctor; - bool isInOutPatient; - String isInOutPatientDescription; - String isInOutPatientDescriptionN; - int noOfPatientsRate; + String? setupID; + int? projectID; + int? patientID; + int? patientType; + int? clinicID; + int? doctorID; + int? requestNo; + DateTime? requestDate; + int? sickLeaveDays; + int? appointmentNo; + int? admissionNo; + int? actualDoctorRate; + DateTime? appointmentDate; + String? clinicName; + String? doctorImageURL; + String? doctorName; + int? doctorRate; + String? doctorTitle; + int? gender; + String? genderDescription; + bool? isActiveDoctorProfile; + bool? isDoctorAllowVedioCall; + bool? isExecludeDoctor; + bool? isInOutPatient; + String? isInOutPatientDescription; + String? isInOutPatientDescriptionN; + int? noOfPatientsRate; Null patientName; - String projectName; - String qR; - List speciality; - bool isLiveCareAppointment; - int status; + String? projectName; + String? qR; + List? speciality; + bool? isLiveCareAppointment; + int? status; SickLeave( {this.setupID, @@ -114,7 +114,7 @@ class SickLeave { data['ClinicID'] = this.clinicID; data['DoctorID'] = this.doctorID; data['RequestNo'] = this.requestNo; - data['RequestDate'] = DateUtil.convertDateToString(requestDate); + data['RequestDate'] = DateUtil.convertDateToString(requestDate!); data['SickLeaveDays'] = this.sickLeaveDays; data['AppointmentNo'] = this.appointmentNo; data['AdmissionNo'] = this.admissionNo; diff --git a/lib/core/model/vaccine/my_vaccine.dart b/lib/core/model/vaccine/my_vaccine.dart index da1b243d..0c55bf55 100644 --- a/lib/core/model/vaccine/my_vaccine.dart +++ b/lib/core/model/vaccine/my_vaccine.dart @@ -1,76 +1,76 @@ class VaccineModel { - String setupID; - int projectID; - int patientID; - int invoiceNo; - String procedureID; - String vaccineName; + String? setupID; + int? projectID; + int? patientID; + int? invoiceNo; + String? procedureID; + String? vaccineName; dynamic vaccineNameN; - String invoiceDate; - int doctorID; - int clinicID; - String firstName; - String middleName; - String lastName; + String? invoiceDate; + int? doctorID; + int? clinicID; + String? firstName; + String? middleName; + String? lastName; dynamic firstNameN; dynamic middleNameN; dynamic lastNameN; - String dateofBirth; - int actualDoctorRate; - String age; - String clinicName; - String doctorImageURL; - String doctorName; - int doctorRate; - String doctorTitle; - int gender; - String genderDescription; - bool isActiveDoctorProfile; - bool isDoctorAllowVedioCall; - bool isExecludeDoctor; - int noOfPatientsRate; - String patientName; - String projectName; - String qR; - List speciality; - String vaccinationDate; + String? dateofBirth; + int? actualDoctorRate; + String? age; + String? clinicName; + String? doctorImageURL; + String? doctorName; + int? doctorRate; + String? doctorTitle; + int? gender; + String? genderDescription; + bool? isActiveDoctorProfile; + bool? isDoctorAllowVedioCall; + bool? isExecludeDoctor; + int? noOfPatientsRate; + String? patientName; + String? projectName; + String? qR; + List? speciality; + String? vaccinationDate; VaccineModel( {this.setupID, - this.projectID, - this.patientID, - this.invoiceNo, - this.procedureID, - this.vaccineName, - this.vaccineNameN, - this.invoiceDate, - this.doctorID, - this.clinicID, - this.firstName, - this.middleName, - this.lastName, - this.firstNameN, - this.middleNameN, - this.lastNameN, - this.dateofBirth, - this.actualDoctorRate, - this.age, - this.clinicName, - this.doctorImageURL, - this.doctorName, - this.doctorRate, - this.doctorTitle, - this.gender, - this.genderDescription, - this.isActiveDoctorProfile, - this.isDoctorAllowVedioCall, - this.isExecludeDoctor, - this.noOfPatientsRate, - this.patientName, - this.projectName, - this.qR, - this.speciality, - this.vaccinationDate}); + this.projectID, + this.patientID, + this.invoiceNo, + this.procedureID, + this.vaccineName, + this.vaccineNameN, + this.invoiceDate, + this.doctorID, + this.clinicID, + this.firstName, + this.middleName, + this.lastName, + this.firstNameN, + this.middleNameN, + this.lastNameN, + this.dateofBirth, + this.actualDoctorRate, + this.age, + this.clinicName, + this.doctorImageURL, + this.doctorName, + this.doctorRate, + this.doctorTitle, + this.gender, + this.genderDescription, + this.isActiveDoctorProfile, + this.isDoctorAllowVedioCall, + this.isExecludeDoctor, + this.noOfPatientsRate, + this.patientName, + this.projectName, + this.qR, + this.speciality, + this.vaccinationDate}); VaccineModel.fromJson(Map json) { setupID = json['SetupID']; diff --git a/lib/core/model/vaccine/vaccination_item.dart b/lib/core/model/vaccine/vaccination_item.dart index 0009ea7d..63201361 100644 --- a/lib/core/model/vaccine/vaccination_item.dart +++ b/lib/core/model/vaccine/vaccination_item.dart @@ -1,6 +1,6 @@ class VaccinationItem { - String dESCRIPTION; - String iTEMCODE; + String? dESCRIPTION; + String? iTEMCODE; VaccinationItem({this.dESCRIPTION, this.iTEMCODE}); diff --git a/lib/core/model/vaccine/vaccination_on_hand.dart b/lib/core/model/vaccine/vaccination_on_hand.dart index daf3e886..18571a73 100644 --- a/lib/core/model/vaccine/vaccination_on_hand.dart +++ b/lib/core/model/vaccine/vaccination_on_hand.dart @@ -1,12 +1,12 @@ class VaccinationOnHand { - int distanceInKilometers; - int iTEMONHAND; - bool isThereItems; - String oRGANIZATIONCODE; - String oRGANIZATIONNAME; - String projectAlias; - int projectID; - String projectName; + int? distanceInKilometers; + int? iTEMONHAND; + bool? isThereItems; + String? oRGANIZATIONCODE; + String? oRGANIZATIONNAME; + String? projectAlias; + int? projectID; + String? projectName; VaccinationOnHand( {this.distanceInKilometers, diff --git a/lib/core/model/vital_sign/vital_sign_req_model.dart b/lib/core/model/vital_sign/vital_sign_req_model.dart index 7cad3ef7..f39566aa 100644 --- a/lib/core/model/vital_sign/vital_sign_req_model.dart +++ b/lib/core/model/vital_sign/vital_sign_req_model.dart @@ -1,18 +1,18 @@ class VitalSignReqModel { - int patientID; - int projectID; - int patientTypeID; - int inOutpatientType; - int transNo; - int languageID; - String stamp ; - String iPAdress; - double versionID; - int channel; - String tokenID; - String sessionID; - bool isLoginForDoctorApp; - bool patientOutSA; + int? patientID; + int? projectID; + int? patientTypeID; + int? inOutpatientType; + int? transNo; + int? languageID; + String? stamp ; + String? iPAdress; + double? versionID; + int? channel; + String? tokenID; + String? sessionID; + bool? isLoginForDoctorApp; + bool? patientOutSA; VitalSignReqModel( {this.patientID, diff --git a/lib/core/model/vital_sign/vital_sign_res_model.dart b/lib/core/model/vital_sign/vital_sign_res_model.dart index 1377e626..53b385fe 100644 --- a/lib/core/model/vital_sign/vital_sign_res_model.dart +++ b/lib/core/model/vital_sign/vital_sign_res_model.dart @@ -27,9 +27,9 @@ class VitalSignResModel { var painDuration; var painCharacter; var painFrequency; - bool isPainManagementDone; + bool? isPainManagementDone; var status; - bool isVitalsRequired; + bool? isVitalsRequired; var patientID; var createdOn; var doctorID; @@ -37,7 +37,7 @@ class VitalSignResModel { var triageCategory; var gCScore; var lineItemNo; - DateTime vitalSignDate; + DateTime? vitalSignDate; var actualTimeTaken; var sugarLevel; var fBS; diff --git a/lib/core/model/weahter/weather_model.dart b/lib/core/model/weahter/weather_model.dart index 37ee5983..f726cd61 100644 --- a/lib/core/model/weahter/weather_model.dart +++ b/lib/core/model/weahter/weather_model.dart @@ -1,32 +1,32 @@ class WeatherIndicatorModel { 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 citiesList; Null cityName; Null get5DaysWeatherForecastList; - List getCityInfoList; + List? getCityInfoList; Null getTodayWeatherForecastList; Null iniciesList; @@ -91,9 +91,9 @@ class WeatherIndicatorModel { cityName = json['CityName']; get5DaysWeatherForecastList = json['Get5DaysWeatherForecastList']; if (json['GetCityInfo_List'] != null) { - getCityInfoList = new List(); + getCityInfoList = []; json['GetCityInfo_List'].forEach((v) { - getCityInfoList.add(new GetCityInfoList.fromJson(v)); + getCityInfoList!.add(new GetCityInfoList.fromJson(v)); }); } getTodayWeatherForecastList = json['GetTodayWeatherForecastList']; @@ -131,7 +131,7 @@ class WeatherIndicatorModel { data['Get5DaysWeatherForecastList'] = this.get5DaysWeatherForecastList; if (this.getCityInfoList != null) { data['GetCityInfo_List'] = - this.getCityInfoList.map((v) => v.toJson()).toList(); + this.getCityInfoList!.map((v) => v.toJson()).toList(); } data['GetTodayWeatherForecastList'] = this.getTodayWeatherForecastList; data['IniciesList'] = this.iniciesList; @@ -140,25 +140,25 @@ class WeatherIndicatorModel { } class GetCityInfoList { - CategoriesNames categoriesNames; - String category; - String categoryValue; - int cityID; - String cityName; - String cityNameN; - String colorName; - String createdOn; - String iD; - int iniceID; - bool isOrderEmpty; - bool isValuesReversed; - bool language; - double latitude; - double longitude; - String name; - int orderNum; - double temperature; - String value; + CategoriesNames? categoriesNames; + String? category; + String? categoryValue; + int? cityID; + String? cityName; + String? cityNameN; + String? colorName; + String? createdOn; + String? iD; + int? iniceID; + bool? isOrderEmpty; + bool? isValuesReversed; + bool? language; + double? latitude; + double? longitude; + String? name; + int? orderNum; + double? temperature; + String? value; GetCityInfoList( {this.categoriesNames, @@ -208,7 +208,7 @@ class GetCityInfoList { Map toJson() { final Map data = new Map(); if (this.categoriesNames != null) { - data['CategoriesNames'] = this.categoriesNames.toJson(); + data['CategoriesNames'] = this.categoriesNames!.toJson(); } data['Category'] = this.category; data['CategoryValue'] = this.categoryValue; @@ -233,11 +233,11 @@ class GetCityInfoList { } class CategoriesNames { - String category1; - String category2; - String category3; - String category4; - String category5; + String? category1; + String? category2; + String? category3; + String? category4; + String? category5; CategoriesNames( {this.category1, diff --git a/lib/core/service/AlHabibMedicalService/H2O_service.dart b/lib/core/service/AlHabibMedicalService/H2O_service.dart index 9483bc31..29a6aac8 100644 --- a/lib/core/service/AlHabibMedicalService/H2O_service.dart +++ b/lib/core/service/AlHabibMedicalService/H2O_service.dart @@ -9,9 +9,9 @@ import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/H2O/user_p import 'package:diplomaticquarterapp/core/service/base_service.dart'; class H2OService extends BaseService { - List userProgressForTodayDataList = List(); - List userProgressForWeekDataList = List(); - List userProgressForMonthDataList = List(); + List userProgressForTodayDataList = []; + List userProgressForWeekDataList =[]; + List userProgressForMonthDataList = []; UserProgressRequestModel userProgressRequestModel = UserProgressRequestModel(); UserDetailModel userDetailModel = UserDetailModel(); diff --git a/lib/core/service/AlHabibMedicalService/cmc_service.dart b/lib/core/service/AlHabibMedicalService/cmc_service.dart index e1bb4154..9b644518 100644 --- a/lib/core/service/AlHabibMedicalService/cmc_service.dart +++ b/lib/core/service/AlHabibMedicalService/cmc_service.dart @@ -14,13 +14,13 @@ import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealth import '../base_service.dart'; class CMCService extends BaseService { - List cmcAllServicesList = List(); - List cmcAllPresOrdersList = List(); + List cmcAllServicesList = []; + List cmcAllPresOrdersList = []; - List cmcAllOrderDetail = List(); - List checkupItemsList = List(); + List cmcAllOrderDetail = []; + List checkupItemsList = []; - bool isOrderUpdated; + bool? isOrderUpdated; Future getCMCAllServices() async { GetCMCServicesRequestModel getCMCServicesRequestModel = @@ -130,10 +130,10 @@ class CMCService extends BaseService { }, body: updatePresOrderRequestModel.toJson()); } - Future insertCMCOrderRC({CMCInsertPresOrderRequestModel order}) async { + Future insertCMCOrderRC({CMCInsertPresOrderRequestModel? order}) async { hasError = false; String reqId = ""; - order.latitude = 0.0; + order!.latitude = 0.0; order.longitude = 0.0; await baseAppClient.post(ADD_CMC_ORDER_RC, isRCService: true, onSuccess: (dynamic response, int statusCode) { isOrderUpdated = true; @@ -145,7 +145,7 @@ class CMCService extends BaseService { return reqId; } - Future insertPresPresOrder({CMCInsertPresOrderRequestModel order}) async { + Future insertPresPresOrder({CMCInsertPresOrderRequestModel? order}) async { hasError = false; String reqId = ""; await baseAppClient.post(PATIENT_ER_INSERT_PRES_ORDER, onSuccess: (dynamic response, int statusCode) { @@ -154,7 +154,7 @@ class CMCService extends BaseService { }, onFailure: (String error, int statusCode) { hasError = true; super.error = error; - }, body: order.toJson()); + }, body: order!.toJson()); return reqId; } } diff --git a/lib/core/service/AlHabibMedicalService/customer_addresses_service.dart b/lib/core/service/AlHabibMedicalService/customer_addresses_service.dart index f3cc5dd7..6cbdc5c3 100644 --- a/lib/core/service/AlHabibMedicalService/customer_addresses_service.dart +++ b/lib/core/service/AlHabibMedicalService/customer_addresses_service.dart @@ -7,12 +7,12 @@ import 'package:intl/intl.dart'; import '../base_service.dart'; class CustomerAddressesService extends BaseService { - List addressesList = List(); + List addressesList = []; CustomerInfo customerInfo = new CustomerInfo(); - Future addAddressInfo({AddNewAddressRequestModel addNewAddressRequestModel}) async { + Future addAddressInfo({AddNewAddressRequestModel? addNewAddressRequestModel}) async { var customerId = await sharedPref.getString(PHARMACY_CUSTOMER_ID); - addNewAddressRequestModel.customer.email = addNewAddressRequestModel.customer.addresses[0].email; + addNewAddressRequestModel!.customer.email = addNewAddressRequestModel.customer.addresses[0].email; addNewAddressRequestModel.customer.id = customerId; addNewAddressRequestModel.customer.roleIds = [3]; addNewAddressRequestModel.customer.addresses[0].phoneNumber = addNewAddressRequestModel.customer.addresses[0].phoneNumber; @@ -65,7 +65,7 @@ class CustomerAddressesService extends BaseService { } class CustomerInfo { - bool isRegistered; + bool? isRegistered; dynamic userName; dynamic password; dynamic email; @@ -99,24 +99,24 @@ class CustomerInfo { } class AddressInfo { - String id; - String firstName; - String lastName; - String email; + String? id; + String? firstName; + String? lastName; + String? email; dynamic company; dynamic countryId; - String country; + String? country; dynamic stateProvinceId; - String city; - String address1; - String address2; - String zipPostalCode; - String phoneNumber; + String? city; + String? address1; + String? address2; + String? zipPostalCode; + String? phoneNumber; dynamic faxNumber; - String customerAttributes; - String createdOnUtc; + String? customerAttributes; + String? createdOnUtc; dynamic province; - String latLong; + String? latLong; AddressInfo( {this.id, diff --git a/lib/core/service/AlHabibMedicalService/e_referral_service.dart b/lib/core/service/AlHabibMedicalService/e_referral_service.dart index f3791f4b..ba488d14 100644 --- a/lib/core/service/AlHabibMedicalService/e_referral_service.dart +++ b/lib/core/service/AlHabibMedicalService/e_referral_service.dart @@ -10,23 +10,23 @@ import 'package:diplomaticquarterapp/core/service/base_service.dart'; import 'package:flutter/material.dart'; class EReferralService extends BaseService { - List _relationTypes = List(); + List _relationTypes =[]; List get relationTypes => _relationTypes; - List _allCities = List(); + List _allCities = []; List get allCities => _allCities; - List _allReferral = List(); + List _allReferral = []; List get allReferral => _allReferral; - String _activationCode; - String _logInTokenID; - String _referralNumber; + String? _activationCode; + String? _logInTokenID; + String? _referralNumber; - String get activationCode => _activationCode; + String get activationCode => _activationCode!; - String get referralNumber => _referralNumber; + String get referralNumber => _referralNumber!; bool _isActivationCodeValid = false; diff --git a/lib/core/service/AlHabibMedicalService/health-calculator/bariatrics-service.dart b/lib/core/service/AlHabibMedicalService/health-calculator/bariatrics-service.dart index 139c251b..ee3cf458 100644 --- a/lib/core/service/AlHabibMedicalService/health-calculator/bariatrics-service.dart +++ b/lib/core/service/AlHabibMedicalService/health-calculator/bariatrics-service.dart @@ -13,8 +13,8 @@ class BariatricsService extends BaseService { List doctorList = []; List doctorListByTime = []; - double lat; - double long; + double? lat; + double? long; Future getClinicCategory() async { hasError = false; @@ -76,7 +76,7 @@ class BariatricsService extends BaseService { }, body: body); } - Future getDoctorList({@required DiseasesByClinic disease}) async { + Future getDoctorList({required DiseasesByClinic disease}) async { hasError = false; var languageID = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar'); @@ -106,7 +106,7 @@ class BariatricsService extends BaseService { }, body: body); } - Future getCalculationDoctors({@required int calculationID}) async { + Future getCalculationDoctors({required int calculationID}) async { if (await this.sharedPref.getDouble(USER_LAT) != null && await this.sharedPref.getDouble(USER_LONG) != null) { lat = await this.sharedPref.getDouble(USER_LAT); diff --git a/lib/core/service/AlHabibMedicalService/home_health_care_service.dart b/lib/core/service/AlHabibMedicalService/home_health_care_service.dart index 99220b07..1f671d96 100644 --- a/lib/core/service/AlHabibMedicalService/home_health_care_service.dart +++ b/lib/core/service/AlHabibMedicalService/home_health_care_service.dart @@ -13,15 +13,15 @@ import 'package:diplomaticquarterapp/core/service/AlHabibMedicalService/customer import '../base_service.dart'; class HomeHealthCareService extends BaseService { - List hhcAllServicesList = List(); - List hhcAllPresOrdersList = List(); + List hhcAllServicesList = []; + List hhcAllPresOrdersList = []; - List hhcAllOrderDetail = List(); - List addressesList = List(); + List hhcAllOrderDetail = []; + List addressesList = []; dynamic hhcResponse; - bool isOrderUpdated; - CustomerInfo customerInfo; - int requestNo; + bool? isOrderUpdated; + CustomerInfo? customerInfo; + int? requestNo; Future getHHCAllServices(HHCGetAllServicesRequestModel hHCGetAllServicesRequestModel) async { hasError = false; @@ -114,7 +114,7 @@ class HomeHealthCareService extends BaseService { }, body: updatePresOrderRequestModel.toJson()); } - Future insertPresPresOrder({PatientERInsertPresOrderRequestModel order}) async { + Future insertPresPresOrder({PatientERInsertPresOrderRequestModel? order}) async { hasError = false; await baseAppClient.post(INSERT_ER_INERT_PRES_ORDER, onSuccess: (dynamic response, int statusCode) { hhcResponse = response; @@ -122,10 +122,10 @@ class HomeHealthCareService extends BaseService { }, onFailure: (String error, int statusCode) { hasError = true; super.error = error; - }, body: order.toJson()); + }, body: order!.toJson()); } - Future insertHHCOrderRC({PatientERInsertPresOrderRequestModel order}) async { + Future insertHHCOrderRC({PatientERInsertPresOrderRequestModel? order}) async { hasError = false; await baseAppClient.post(ADD_HHC_ORDER_RC, isRCService: true, onSuccess: (dynamic response, int statusCode) { hhcResponse = response; @@ -133,6 +133,6 @@ class HomeHealthCareService extends BaseService { }, onFailure: (String error, int statusCode) { hasError = true; super.error = error; - }, body: order.toJson()); + }, body: order!.toJson()); } } diff --git a/lib/core/service/AuthenticatedUserObject.dart b/lib/core/service/AuthenticatedUserObject.dart index 60a65706..be065ce6 100644 --- a/lib/core/service/AuthenticatedUserObject.dart +++ b/lib/core/service/AuthenticatedUserObject.dart @@ -3,7 +3,7 @@ import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.da import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; class AuthenticatedUserObject { - AuthenticatedUser user; + AuthenticatedUser? user; AppSharedPreferences sharedPref = AppSharedPreferences(); bool isLogin = false; diff --git a/lib/core/service/PrescriptionDeliveryService.dart b/lib/core/service/PrescriptionDeliveryService.dart index 02831893..15825de4 100644 --- a/lib/core/service/PrescriptionDeliveryService.dart +++ b/lib/core/service/PrescriptionDeliveryService.dart @@ -2,7 +2,7 @@ import 'package:diplomaticquarterapp/config/config.dart'; import 'package:diplomaticquarterapp/core/service/base_service.dart'; class PrescriptionDeliveryService extends BaseService { - Future insertDeliveryOrder({int lineItemNo, double latitude, double longitude, int appointmentNo, int createdBy, int dischargeID}) async { + Future insertDeliveryOrder({int? lineItemNo, double? latitude, double? longitude, int? appointmentNo, int? createdBy, int? dischargeID}) async { hasError = false; Map body = Map(); body['LineItemNo'] = lineItemNo; @@ -20,7 +20,7 @@ class PrescriptionDeliveryService extends BaseService { }, body: body); } - Future insertDeliveryOrderRC({double latitude, double longitude, int appointmentNo, int createdBy, int dischargeID, int projectID}) async { + Future insertDeliveryOrderRC({double? latitude, double? longitude, int? appointmentNo, int? createdBy, int? dischargeID, int? projectID}) async { hasError = false; Map body = Map(); body['latitude'] = latitude; diff --git a/lib/core/service/ancillary_orders_service.dart b/lib/core/service/ancillary_orders_service.dart index 631f17ff..a9608682 100644 --- a/lib/core/service/ancillary_orders_service.dart +++ b/lib/core/service/ancillary_orders_service.dart @@ -4,10 +4,10 @@ import 'package:diplomaticquarterapp/models/anicllary-orders/ancillary_order_lis import 'package:diplomaticquarterapp/models/anicllary-orders/ancillary_order_proc_model.dart'; class AncillaryOrdersService extends BaseService { - List _ancillaryLists = List(); + List _ancillaryLists =[]; List get ancillaryLists => _ancillaryLists; - List _ancillaryProcLists = List(); + List _ancillaryProcLists =[]; List get ancillaryProcLists => _ancillaryProcLists; diff --git a/lib/core/service/appointment_rate_service.dart b/lib/core/service/appointment_rate_service.dart index 16355e9a..b02f809c 100644 --- a/lib/core/service/appointment_rate_service.dart +++ b/lib/core/service/appointment_rate_service.dart @@ -5,8 +5,8 @@ import 'package:diplomaticquarterapp/core/model/rate/appoitment_rated.dart'; import 'package:diplomaticquarterapp/core/service/base_service.dart'; class AppointmentRateService extends BaseService { - List appointmentRatedList = List(); - AppointmentDetails appointmentDetails; + List appointmentRatedList =[]; + AppointmentDetails? appointmentDetails; Future getIsLastAppointmentRatedList() async { hasError = false; @@ -62,16 +62,16 @@ class AppointmentRateService extends BaseService { "ProjectID": projectID, "AppointmentNo": appointmentNo, "Note": note, - "MobileNumber": authenticatedUserObject.user.mobileNumber, + "MobileNumber": authenticatedUserObject.user!.mobileNumber, "AppointmentDate": appoDate, "DoctorName": docName, "ProjectName": projectName, "COCTypeName": 1, - "PatientName": authenticatedUserObject.user.firstName + " " + authenticatedUserObject.user.lastName, - "PatientOutSA": authenticatedUserObject.user.outSA, - "PatientTypeID": authenticatedUserObject.user.patientType, + "PatientName": authenticatedUserObject.user!.firstName + " " + authenticatedUserObject.user!.lastName, + "PatientOutSA": authenticatedUserObject.user!.outSA, + "PatientTypeID": authenticatedUserObject.user!.patientType, "ClinicName": clinicName, - "PatientIdentificationID": authenticatedUserObject.user.patientIdentificationNo + "PatientIdentificationID": authenticatedUserObject.user!.patientIdentificationNo }; await baseAppClient.post(NEW_RATE_DOCTOR_URL, onSuccess: (dynamic response, int statusCode) {}, onFailure: (String error, int statusCode) { @@ -82,7 +82,7 @@ class AppointmentRateService extends BaseService { AppoitmentRated get lastAppointmentRated { if (appointmentRatedList.length > 0) return appointmentRatedList[appointmentRatedList.length - 1]; - return null; + return AppoitmentRated(); } deleteAppointmentRated(AppoitmentRated appointmentRated) { diff --git a/lib/core/service/base_service.dart b/lib/core/service/base_service.dart index 34b7e1f6..81859b77 100644 --- a/lib/core/service/base_service.dart +++ b/lib/core/service/base_service.dart @@ -7,7 +7,7 @@ import 'AuthenticatedUserObject.dart'; import 'client/base_app_client.dart'; class BaseService { - String error; + String? error; bool hasError = false; BaseAppClient baseAppClient = BaseAppClient(); AuthenticatedUser user = new AuthenticatedUser(); @@ -18,7 +18,7 @@ class BaseService { BaseService() { authenticatedUserObject.getUser(); - user = authenticatedUserObject.user; + user = authenticatedUserObject.user!; // getUser(); } diff --git a/lib/core/service/blood/blood_details_servies.dart b/lib/core/service/blood/blood_details_servies.dart index 589b8dda..eb490086 100644 --- a/lib/core/service/blood/blood_details_servies.dart +++ b/lib/core/service/blood/blood_details_servies.dart @@ -6,10 +6,10 @@ import '../base_service.dart'; class BloodDetailsService extends BaseService{ - // List CitiesModelList = List(); + // List CitiesModelList =[]; // Map body = Map(); - List BloodModelList = List(); + List BloodModelList =[]; Map body = Map(); Future getAllBloodOrders() async { hasError = false; diff --git a/lib/core/service/blood/blood_donation_service.dart b/lib/core/service/blood/blood_donation_service.dart index a59a2169..dd86f312 100644 --- a/lib/core/service/blood/blood_donation_service.dart +++ b/lib/core/service/blood/blood_donation_service.dart @@ -4,11 +4,11 @@ import 'package:diplomaticquarterapp/core/model/blooddonation/get_all_cities.dar import '../base_service.dart'; class BloodDonationService extends BaseService { - //List LivechatModelList = List(); + //List LivechatModelList =[]; // Map body = Map(); - List CitiesModelList = List(); + List CitiesModelList =[]; Map body = Map(); Future getAllCitiesOrders() async { diff --git a/lib/core/service/childvaccines/add_new_child_service.dart b/lib/core/service/childvaccines/add_new_child_service.dart index 95757331..98cf9638 100644 --- a/lib/core/service/childvaccines/add_new_child_service.dart +++ b/lib/core/service/childvaccines/add_new_child_service.dart @@ -7,16 +7,16 @@ import 'package:diplomaticquarterapp/core/model/childvaccines/user_information_m import '../base_service.dart'; class CreteNewBabyService extends BaseService { - List createNewBabyModelList = List(); - List userModelList = List(); - List newUserModelList = List(); + List createNewBabyModelList =[]; + List userModelList =[]; + List newUserModelList =[]; - Future getCreateNewBabyOrders({CreateNewBaby newChild,int userID}) async { + Future getCreateNewBabyOrders({CreateNewBaby? newChild,int? userID}) async { hasError = false; await getUser(); - Map body = Map.from(newChild.toJson()); + Map body = Map.from(newChild!.toJson()); body['CreatedBy'] = 102; body['EditedBy'] = 102; body['UserID'] = userID; diff --git a/lib/core/service/childvaccines/child_vaccines_service.dart b/lib/core/service/childvaccines/child_vaccines_service.dart index 03da5ed8..df3934df 100644 --- a/lib/core/service/childvaccines/child_vaccines_service.dart +++ b/lib/core/service/childvaccines/child_vaccines_service.dart @@ -7,8 +7,8 @@ import 'package:diplomaticquarterapp/core/model/childvaccines/user_information_m import '../base_service.dart'; class ChildVaccinesService extends BaseService { - List babyInformationModelList = List(); - List userInformationModelList = List(); + List babyInformationModelList =[]; + List userInformationModelList =[]; int userID = 0; Future getAllBabyInformationOrders() async { diff --git a/lib/core/service/childvaccines/delete_baby_service.dart b/lib/core/service/childvaccines/delete_baby_service.dart index 6fb77a1a..494c92fc 100644 --- a/lib/core/service/childvaccines/delete_baby_service.dart +++ b/lib/core/service/childvaccines/delete_baby_service.dart @@ -11,17 +11,17 @@ import '../base_service.dart'; class DeleteBabyService extends BaseService{ - List createNewBabyModelList = List(); - List userModelList = List(); - List newUserModelList = List(); + List createNewBabyModelList =[]; + List userModelList =[]; + List newUserModelList =[]; - List deleteBabyModelList= List(); + List deleteBabyModelList=[]; - Future getDeleteBabyOrder({DeleteBaby deleteChild,int babyID}) async { + Future getDeleteBabyOrder({DeleteBaby? deleteChild,int? babyID}) async { hasError = false; await getUser(); - Map body = Map.from(deleteChild.toJson()); + Map body = Map.from(deleteChild!.toJson()); // body['CreatedBy'] = 102; body['EditedBy'] = 102; //body['BabyID'] = babyID; diff --git a/lib/core/service/childvaccines/get_vaccinations_item_services.dart b/lib/core/service/childvaccines/get_vaccinations_item_services.dart index 5ff936af..0cf19e9d 100644 --- a/lib/core/service/childvaccines/get_vaccinations_item_services.dart +++ b/lib/core/service/childvaccines/get_vaccinations_item_services.dart @@ -4,7 +4,7 @@ import 'package:diplomaticquarterapp/core/model/childvaccines/get_vacainations_i import '../base_service.dart'; class GetVccinationsItemsService extends BaseService { - List getVaccinationsItemModelList = List(); + List getVaccinationsItemModelList =[]; Map body = Map(); diff --git a/lib/core/service/childvaccines/user_information_service.dart b/lib/core/service/childvaccines/user_information_service.dart index 125ebf73..bdb086d8 100644 --- a/lib/core/service/childvaccines/user_information_service.dart +++ b/lib/core/service/childvaccines/user_information_service.dart @@ -5,7 +5,7 @@ import 'package:diplomaticquarterapp/core/model/childvaccines/user_information_m import '../base_service.dart'; class UserInformationService extends BaseService { - List userInformationModelList = List(); + List userInformationModelList =[]; Map body = Map(); Future getUserInformationOrders() async { diff --git a/lib/core/service/childvaccines/vaccination_table_service.dart b/lib/core/service/childvaccines/vaccination_table_service.dart index 22c0d561..330384a9 100644 --- a/lib/core/service/childvaccines/vaccination_table_service.dart +++ b/lib/core/service/childvaccines/vaccination_table_service.dart @@ -6,13 +6,13 @@ import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; import '../base_service.dart'; class VaccinationTableService extends BaseService { - List createVaccinationTableModelList = List(); + List createVaccinationTableModelList =[]; Map body = Map(); Future getCreateVaccinationTableOrders(List_BabyInformationModel babyInfo, bool sendEmail) async { - String babyBDFormatted = "${DateUtil.convertDateToString(babyInfo.dOB)}/"; + String babyBDFormatted = "${DateUtil.convertDateToString(babyInfo.dOB!)}/"; hasError = false; await getUser(); diff --git a/lib/core/service/client/base_app_client.dart b/lib/core/service/client/base_app_client.dart index 698b3b43..99a17d5b 100644 --- a/lib/core/service/client/base_app_client.dart +++ b/lib/core/service/client/base_app_client.dart @@ -37,9 +37,9 @@ class BaseAppClient { final _analytics = locator(); post(String endPoint, - {Map body, - Function(dynamic response, int statusCode) onSuccess, - Function(String error, int statusCode) onFailure, + {Map? body, + Function(dynamic response, int statusCode)? onSuccess, + Function(String error, int statusCode)? onFailure, bool isAllowAny = false, bool isExternal = false, bool isRCService = false, @@ -63,7 +63,7 @@ class BaseAppClient { if (endPoint == SEND_ACTIVATION_CODE) { languageID = 'en'; } - if (body.containsKey('SetupID')) { + if (body!.containsKey('SetupID')) { body['SetupID'] = body.containsKey('SetupID') ? body['SetupID'] != null ? body['SetupID'] @@ -157,7 +157,7 @@ class BaseAppClient { // Mobile no.: 0502303285 // ID: 119116817 - body.removeWhere((key, value) => key == null || value == null); + body!.removeWhere((key, value) => key == null || value == null); if (AppGlobal.isNetworkDebugEnabled) { print("URL : $url"); @@ -169,7 +169,7 @@ class BaseAppClient { final response = await http.post(Uri.parse(url.trim()), body: json.encode(body), headers: headers); final int statusCode = response.statusCode; if (statusCode < 200 || statusCode >= 400 || json == null) { - onFailure('Error While Fetching data', statusCode); + onFailure!('Error While Fetching data', statusCode); logApiEndpointError(endPoint, 'Error While Fetching data', statusCode); } else { var decoded = utf8.decode(response.bodyBytes); @@ -178,10 +178,10 @@ class BaseAppClient { // print("Response: $parsed"); if (isAllowAny) { - onSuccess(parsed, statusCode); + onSuccess!(parsed, statusCode); } else { if (parsed['Response_Message'] != null) { - onSuccess(parsed, statusCode); + onSuccess!(parsed, statusCode); } else { if (parsed['ErrorType'] == 4) { navigateToAppUpdate(AppGlobal.context, parsed['ErrorEndUserMessage']); @@ -192,39 +192,39 @@ class BaseAppClient { logApiEndpointError(endPoint, "session logged out", statusCode); } if (isAllowAny) { - onSuccess(parsed, statusCode); + onSuccess!(parsed, statusCode); } else if (parsed['IsAuthenticated'] == null) { if (parsed['isSMSSent'] == true) { - onSuccess(parsed, statusCode); + onSuccess!(parsed, statusCode); } else if (parsed['MessageStatus'] == 1) { - onSuccess(parsed, statusCode); + onSuccess!(parsed, statusCode); } else if (parsed['Result'] == 'OK') { - onSuccess(parsed, statusCode); + onSuccess!(parsed, statusCode); } else { // if (parsed != null) { // onSuccess(parsed, statusCode); // } else { - onFailure(parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage'], statusCode); + onFailure!(parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage'], statusCode); logApiEndpointError(endPoint, parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage'], statusCode); // logout(); // } } } else if (parsed['MessageStatus'] == 1 || parsed['SMSLoginRequired'] == true) { - onSuccess(parsed, statusCode); + onSuccess!(parsed, statusCode); } else if (parsed['MessageStatus'] == 2 && parsed['IsAuthenticated']) { if (parsed['SameClinicApptList'] != null) { - onSuccess(parsed, statusCode); + onSuccess!(parsed, statusCode); } else { if (parsed['message'] == null && parsed['ErrorEndUserMessage'] == null) { if (parsed['ErrorSearchMsg'] == null) { - onFailure("Server Error found with no available message", statusCode); + onFailure!("Server Error found with no available message", statusCode); logApiEndpointError(endPoint, "Server Error found with no available message", statusCode); } else { - onFailure(parsed['ErrorSearchMsg'], statusCode); + onFailure!(parsed['ErrorSearchMsg'], statusCode); logApiEndpointError(endPoint, parsed['ErrorSearchMsg'], statusCode); } } else { - onFailure(parsed['message'] ?? parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage'], statusCode); + onFailure!(parsed['message'] ?? parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage'], statusCode); logApiEndpointError(endPoint, parsed['message'] ?? parsed['message'], statusCode); } } @@ -234,13 +234,13 @@ class BaseAppClient { // } else { if (parsed['SameClinicApptList'] != null) { - onSuccess(parsed, statusCode); + onSuccess!(parsed, statusCode); } else { if (parsed['message'] != null) { - onFailure(parsed['message'] ?? parsed['message'], statusCode); + onFailure!(parsed['message'] ?? parsed['message'], statusCode); logApiEndpointError(endPoint, parsed['message'] ?? parsed['message'], statusCode); } else { - onFailure(parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage'], statusCode); + onFailure!(parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage'], statusCode); logApiEndpointError(endPoint, parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage'], statusCode); } } @@ -249,18 +249,18 @@ class BaseAppClient { } } } else { - onFailure('Please Check The Internet Connection', -1); + onFailure!('Please Check The Internet Connection', -1); _analytics.errorTracking.log("internet_connectivity", error: "no internet available"); } } catch (e) { print(e); - onFailure(e.toString(), -1); + onFailure!(e.toString(), -1); _analytics.errorTracking.log(endPoint, error: "api exception: $e"); } } postPharmacy(String endPoint, - {Map body, Function(dynamic response, int statusCode) onSuccess, Function(String error, int statusCode) onFailure, bool isAllowAny = false, bool isExternal = false}) async { + {Map? body, Function(dynamic response, int statusCode)? onSuccess, Function(String error, int statusCode)? onFailure, bool isAllowAny = false, bool isExternal = false}) async { var token = await sharedPref.getString(PHARMACY_AUTORZIE_TOKEN); var user = await sharedPref.getObject(USER_PROFILE); String url; @@ -349,53 +349,53 @@ class BaseAppClient { final int statusCode = response.statusCode; // print("statusCode :$statusCode"); if (statusCode < 200 || statusCode >= 400 || json == null) { - onFailure('Error While Fetching data', statusCode); + onFailure!('Error While Fetching data', statusCode); logApiEndpointError(endPoint, 'Error While Fetching data', statusCode); } else { // var parsed = json.decode(response.body.toString()); var parsed = json.decode(utf8.decode(response.bodyBytes)); if (parsed['Response_Message'] != null) { - onSuccess(parsed, statusCode); + onSuccess!(parsed, statusCode); } else { if (parsed['ErrorType'] == 4) { navigateToAppUpdate(AppGlobal.context, parsed['ErrorEndUserMessage']); logApiEndpointError(endPoint, parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage'], statusCode); } if (isAllowAny) { - onSuccess(parsed, statusCode); + onSuccess!(parsed, statusCode); } else if (parsed['IsAuthenticated'] == null) { if (parsed['isSMSSent'] == true) { - onSuccess(parsed, statusCode); + onSuccess!(parsed, statusCode); } else if (parsed['MessageStatus'] == 1) { - onSuccess(parsed, statusCode); + onSuccess!(parsed, statusCode); } else if (parsed['Result'] == 'OK') { - onSuccess(parsed, statusCode); + onSuccess!(parsed, statusCode); } else { if (parsed != null) { - onSuccess(parsed, statusCode); + onSuccess!(parsed, statusCode); } else { - onFailure(parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage'], statusCode); + onFailure!(parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage'], statusCode); logApiEndpointError(endPoint, parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage'], statusCode); logApiEndpointError(endPoint, 'session logged out', statusCode); logout(); } } } else if (parsed['MessageStatus'] == 1 || parsed['SMSLoginRequired'] == true) { - onSuccess(parsed, statusCode); + onSuccess!(parsed, statusCode); } else if (parsed['MessageStatus'] == 2 && parsed['IsAuthenticated']) { if (parsed['SameClinicApptList'] != null) { - onSuccess(parsed, statusCode); + onSuccess!(parsed, statusCode); } else { if (parsed['message'] == null && parsed['ErrorEndUserMessage'] == null) { if (parsed['ErrorSearchMsg'] == null) { - onFailure("Server Error found with no available message", statusCode); + onFailure!("Server Error found with no available message", statusCode); logApiEndpointError(endPoint, "Server Error found with no available message", statusCode); } else { - onFailure(parsed['ErrorSearchMsg'], statusCode); + onFailure!(parsed['ErrorSearchMsg'], statusCode); logApiEndpointError(endPoint, parsed['ErrorSearchMsg'] ?? parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage'], statusCode); } } else { - onFailure(parsed['message'] ?? parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage'], statusCode); + onFailure!(parsed['message'] ?? parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage'], statusCode); logApiEndpointError(endPoint, parsed['message'] ?? parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage'], statusCode); } } @@ -405,13 +405,13 @@ class BaseAppClient { //helpers.showErrorToast('Your session expired Please login agian'); } else { if (parsed['SameClinicApptList'] != null) { - onSuccess(parsed, statusCode); + onSuccess!(parsed, statusCode); } else { if (parsed['message'] != null) { - onFailure(parsed['message'] ?? parsed['message'], statusCode); + onFailure!(parsed['message'] ?? parsed['message'], statusCode); logApiEndpointError(endPoint, parsed['message'] ?? parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage'], statusCode); } else { - onFailure(parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage'], statusCode); + onFailure!(parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage'], statusCode); logApiEndpointError(endPoint, parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage'], statusCode); } } @@ -419,12 +419,12 @@ class BaseAppClient { } } } else { - onFailure('Please Check The Internet Connection', -1); + onFailure!('Please Check The Internet Connection', -1); _analytics.errorTracking.log("internet_connectivity", error: "no internet available"); } } catch (e) { print(e); - onFailure(e.toString(), -1); + onFailure!(e.toString(), -1); _analytics.errorTracking.log(endPoint, error: "api exception: $e"); } } @@ -438,9 +438,9 @@ class BaseAppClient { } get(String endPoint, - {Function(dynamic response, int statusCode) onSuccess, - Function(String error, int statusCode) onFailure, - Map queryParams, + {Function(dynamic response, int statusCode)? onSuccess, + Function(String error, int statusCode)? onFailure, + Map? queryParams, bool isExternal = false, bool isRCService = false}) async { String url; @@ -469,24 +469,24 @@ class BaseAppClient { // print("statusCode :$statusCode"); if (statusCode < 200 || statusCode >= 400 || json == null) { - onFailure('Error While Fetching data', statusCode); + onFailure!('Error While Fetching data', statusCode); logApiEndpointError(endPoint, 'Error While Fetching data', statusCode); } else { var parsed = json.decode(utf8.decode(response.bodyBytes)); - onSuccess(parsed, statusCode); + onSuccess!(parsed, statusCode); } } else { - onFailure('Please Check The Internet Connection', -1); + onFailure!('Please Check The Internet Connection', -1); _analytics.errorTracking.log("internet_connectivity", error: "no internet available"); } } getPharmacy(String endPoint, - {Function(dynamic response, int statusCode) onSuccess, - Function(String error, int statusCode) onFailure, + {Function(dynamic response, int statusCode)? onSuccess, + Function(String error, int statusCode)? onFailure, bool isAllowAny = false, bool isExternal = false, - Map queryParams}) async { + Map? queryParams}) async { var token = await sharedPref.getString(PHARMACY_AUTORZIE_TOKEN); var user = await sharedPref.getObject(USER_PROFILE); @@ -519,39 +519,39 @@ class BaseAppClient { if (statusCode < 200 || statusCode >= 400 || json == null) { if (statusCode == 401) { - onFailure(TranslationBase.of(AppGlobal.context).pharmacyRelogin, statusCode); + onFailure!(TranslationBase.of(AppGlobal.context).pharmacyRelogin, statusCode); logApiEndpointError(endPoint, TranslationBase.of(AppGlobal.context).pharmacyRelogin, statusCode); Navigator.of(AppGlobal.context).pushNamed(HOME); } else { var bodyUtf = json.decode(utf8.decode(response.bodyBytes)); // print(bodyUtf); - onFailure(bodyUtf['error']['ErrorEndUserMsg'], statusCode); + onFailure!(bodyUtf['error']['ErrorEndUserMsg'], statusCode); logApiEndpointError(endPoint, bodyUtf['error']['ErrorEndUserMsg'], statusCode); } } else { // var parsed = json.decode(response.body.toString()); var bodyUtf = json.decode(utf8.decode(response.bodyBytes)); - onSuccess(bodyUtf, statusCode); + onSuccess!(bodyUtf, statusCode); } } else { - onFailure('Please Check The Internet Connection', -1); + onFailure!('Please Check The Internet Connection', -1); _analytics.errorTracking.log("internet_connectivity", error: "no internet available"); } } simplePost( String fullUrl, { - Map body, - Map headers, - Function(dynamic response, int statusCode) onSuccess, - Function(String error, int statusCode) onFailure, + Map? body, + Map? headers, + Function(dynamic response, int statusCode)? onSuccess, + Function(String error, int statusCode)? onFailure, }) async { String url = fullUrl; // print("URL Query String: $url"); // print("body: $body"); if (await Utils.checkConnection()) { - headers.addAll({'Content-Type': 'application/json', 'Accept': 'application/json'}); + headers!.addAll({'Content-Type': 'application/json', 'Accept': 'application/json'}); final response = await http.post( Uri.parse(url.trim()), body: json.encode(body), @@ -564,19 +564,19 @@ class BaseAppClient { // print(response.body.toString()); if (statusCode < 200 || statusCode >= 400 || json == null) { - onFailure('Error While Fetching data', statusCode); + onFailure!('Error While Fetching data', statusCode); logApiFullUrlError(fullUrl, 'Error While Fetching data', statusCode); } else { - onSuccess(response.body.toString(), statusCode); + onSuccess!(response.body.toString(), statusCode); } } else { - onFailure('Please Check The Internet Connection', -1); + onFailure!('Please Check The Internet Connection', -1); _analytics.errorTracking.log("internet_connectivity", error: "no internet available"); } } simpleGet(String fullUrl, - {Function(dynamic response, int statusCode) onSuccess, Function(String error, int statusCode) onFailure, Map queryParams, Map headers}) async { + {Function(dynamic response, int statusCode)? onSuccess, Function(String error, int statusCode)? onFailure, Map? queryParams, Map? headers}) async { headers = headers ?? {}; String url = fullUrl; @@ -599,23 +599,23 @@ class BaseAppClient { if (await handleUnauthorized(statusCode, forUrl: fullUrl)) simpleGet(fullUrl, onFailure: onFailure, onSuccess: onSuccess, headers: headers, queryParams: queryParams); if (statusCode < 200 || statusCode >= 400 || json == null) { - onFailure('Error While Fetching data', statusCode); + onFailure!('Error While Fetching data', statusCode); logApiFullUrlError(fullUrl, 'Error While Fetching data', statusCode); } else { - onSuccess(response.body.toString(), statusCode); + onSuccess!(response.body.toString(), statusCode); } } else { - onFailure('Please Check The Internet Connection', -1); + onFailure!('Please Check The Internet Connection', -1); _analytics.errorTracking.log("internet_connectivity", error: "no internet available"); } } - simplePut(String fullUrl, {Map body, Map headers, Function(dynamic response, int statusCode) onSuccess, Function(String error, int statusCode) onFailure}) async { + simplePut(String fullUrl, {Map? body, Map? headers, Function(dynamic response, int statusCode)? onSuccess, Function(String error, int statusCode)? onFailure}) async { String url = fullUrl; // print("URL Query String: $url"); if (await Utils.checkConnection()) { - headers.addAll({'Content-Type': 'application/json', 'Accept': 'application/json'}); + headers!.addAll({'Content-Type': 'application/json', 'Accept': 'application/json'}); final response = await http.put( Uri.parse(url.trim()), body: json.encode(body), @@ -627,19 +627,19 @@ class BaseAppClient { if (await handleUnauthorized(statusCode, forUrl: fullUrl)) simplePut(fullUrl, onFailure: onFailure, onSuccess: onSuccess, headers: headers, body: body); if (statusCode < 200 || statusCode >= 400 || json == null) { - onFailure('Error While Fetching data', statusCode); + onFailure!('Error While Fetching data', statusCode); logApiFullUrlError(fullUrl, 'Error While Fetching data', statusCode); } else { - onSuccess(response.body.toString(), statusCode); + onSuccess!(response.body.toString(), statusCode); } } else { - onFailure('Please Check The Internet Connection', -1); + onFailure!('Please Check The Internet Connection', -1); _analytics.errorTracking.log("internet_connectivity", error: "no internet available"); } } simpleDelete(String fullUrl, - {Function(dynamic response, int statusCode) onSuccess, Function(String error, int statusCode) onFailure, Map queryParams, Map headers}) async { + {Function(dynamic response, int statusCode)? onSuccess, Function(String error, int statusCode)? onFailure, Map? queryParams, Map? headers}) async { String url = fullUrl; // print("URL Query String: $url"); @@ -651,7 +651,7 @@ class BaseAppClient { } if (await Utils.checkConnection()) { - headers.addAll({'Content-Type': 'application/json', 'Accept': 'application/json'}); + headers!.addAll({'Content-Type': 'application/json', 'Accept': 'application/json'}); final response = await http.delete( Uri.parse(url.trim()), headers: headers, @@ -662,19 +662,19 @@ class BaseAppClient { if (await handleUnauthorized(statusCode, forUrl: fullUrl)) simpleDelete(fullUrl, onFailure: onFailure, onSuccess: onSuccess, queryParams: queryParams, headers: headers); if (statusCode < 200 || statusCode >= 400 || json == null) { - onFailure('Error While Fetching data', statusCode); + onFailure!('Error While Fetching data', statusCode); logApiFullUrlError(fullUrl, 'Error While Fetching data', statusCode); } else { - onSuccess(response.body.toString(), statusCode); + onSuccess!(response.body.toString(), statusCode); } } else { - onFailure('Please Check The Internet Connection', -1); + onFailure!('Please Check The Internet Connection', -1); _analytics.errorTracking.log("internet_connectivity", error: "no internet available"); } } - Future handleUnauthorized(int statusCode, {String forUrl}) async { - if (forUrl.startsWith(EXA_CART_API_BASE_URL) && statusCode == 401) { + Future handleUnauthorized(int statusCode, {String? forUrl}) async { + if (forUrl!.startsWith(EXA_CART_API_BASE_URL) && statusCode == 401) { final token = await generatePackagesToken(); packagesAuthHeader['Authorization'] = 'Bearer $token'; return token != null && (token is String); @@ -690,7 +690,7 @@ class BaseAppClient { var model = Provider.of(AppGlobal.context, listen: false); _vitalSignService.weightKg = ""; _vitalSignService.heightCm = ""; - model.setState(0, false, null); + model.setState(0, false, ""); Navigator.of(AppGlobal.context).pushReplacementNamed(HOME); } @@ -721,7 +721,7 @@ class BaseAppClient { } pharmacyPost(String endPoint, - {Map body, Function(dynamic response, int statusCode) onSuccess, Function(String error, int statusCode) onFailure, bool isAllowAny = false, bool isExternal = false}) async { + {Map? body, Function(dynamic response, int statusCode)? onSuccess, Function(String error, int statusCode)? onFailure, bool isAllowAny = false, bool isExternal = false}) async { var token = await sharedPref.getString(PHARMACY_AUTORZIE_TOKEN); var user = await sharedPref.getObject(USER_PROFILE); String url; @@ -735,7 +735,7 @@ class BaseAppClient { String token = await sharedPref.getString(TOKEN); var languageID = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar'); var user = await sharedPref.getObject(USER_PROFILE); - if (body.containsKey('SetupID')) { + if (body!.containsKey('SetupID')) { body['SetupID'] = body.containsKey('SetupID') ? body['SetupID'] != null ? body['SetupID'] @@ -807,48 +807,48 @@ class BaseAppClient { // print("statusCode :$statusCode"); if (statusCode < 200 || statusCode >= 400 || json == null) { var parsed = json.decode(utf8.decode(response.bodyBytes)); - onFailure(parsed['error']['ErrorEndUserMsgN'] ?? 'Error While Fetching data', statusCode); + onFailure!(parsed['error']['ErrorEndUserMsgN'] ?? 'Error While Fetching data', statusCode); logApiEndpointError(endPoint, parsed['error']['ErrorEndUserMsgN'] ?? 'Error While Fetching data', statusCode); } else { // var parsed = json.decode(response.body.toString()); var parsed = json.decode(utf8.decode(response.bodyBytes)); if (parsed['Response_Message'] != null) { - onSuccess(parsed, statusCode); + onSuccess!(parsed, statusCode); } else { if (parsed['ErrorType'] == 4) { navigateToAppUpdate(AppGlobal.context, parsed['ErrorEndUserMessage']); } if (isAllowAny) { - onSuccess(parsed, statusCode); + onSuccess!(parsed, statusCode); } else if (parsed['IsAuthenticated'] == null) { if (parsed['isSMSSent'] == true) { - onSuccess(parsed, statusCode); + onSuccess!(parsed, statusCode); } else if (parsed['MessageStatus'] == 1) { - onSuccess(parsed, statusCode); + onSuccess!(parsed, statusCode); } else if (parsed['Result'] == 'OK') { - onSuccess(parsed, statusCode); + onSuccess!(parsed, statusCode); } else { if (parsed != null) { - onSuccess(parsed, statusCode); + onSuccess!(parsed, statusCode); } else { - onFailure(parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage'], statusCode); + onFailure!(parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage'], statusCode); logApiEndpointError(endPoint, parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage'], statusCode); logout(); } } } else if (parsed['MessageStatus'] == 1 || parsed['SMSLoginRequired'] == true) { - onSuccess(parsed, statusCode); + onSuccess!(parsed, statusCode); } else if (parsed['MessageStatus'] == 2 && parsed['IsAuthenticated']) { if (parsed['message'] == null && parsed['ErrorEndUserMessage'] == null) { if (parsed['ErrorSearchMsg'] == null) { - onFailure("Server Error found with no available message", statusCode); + onFailure!("Server Error found with no available message", statusCode); logApiEndpointError(endPoint, "Server Error found with no available message", statusCode); } else { - onFailure(parsed['ErrorSearchMsg'], statusCode); + onFailure!(parsed['ErrorSearchMsg'], statusCode); logApiEndpointError(endPoint, parsed['ErrorSearchMsg'], statusCode); } } else { - onFailure(parsed['message'] ?? parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage'], statusCode); + onFailure!(parsed['message'] ?? parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage'], statusCode); logApiEndpointError(endPoint, parsed['message'] ?? parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage'], statusCode); } } else if (!parsed['IsAuthenticated']) { @@ -857,13 +857,13 @@ class BaseAppClient { //helpers.showErrorToast('Your session expired Please login agian'); } else { if (parsed['SameClinicApptList'] != null) { - onSuccess(parsed, statusCode); + onSuccess!(parsed, statusCode); } else { if (parsed['message'] != null) { - onFailure(parsed['message'] ?? parsed['message'], statusCode); + onFailure!(parsed['message'] ?? parsed['message'], statusCode); logApiEndpointError(endPoint, parsed['message'] ?? parsed['message'], statusCode); } else { - onFailure(parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage'], statusCode); + onFailure!(parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage'], statusCode); logApiEndpointError(endPoint, parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage'], statusCode); } } @@ -871,12 +871,12 @@ class BaseAppClient { } } } else { - onFailure('Please Check The Internet Connection', -1); + onFailure!('Please Check The Internet Connection', -1); _analytics.errorTracking.log("internet_connectivity", error: "no internet available"); } } catch (e) { print(e); - onFailure(e.toString(), -1); + onFailure!(e.toString(), -1); logApiEndpointError(endPoint, e.toString(), -1); } } @@ -886,7 +886,7 @@ class BaseAppClient { var body = { "api_client": {"client_id": "a4ab6be4-424f-4836-b032-46caed88e184", "client_secret": "3c1a3e07-4a40-4510-9fb0-ee5f0a72752c"} }; - String token; + String? token; final completer = Completer(); simplePost(url, body: body, headers: {}, onSuccess: (dynamic stringResponse, int statusCode) { if (statusCode == 200) { @@ -899,7 +899,7 @@ class BaseAppClient { logApiFullUrlError(url, error, statusCode); }); await completer.future; - return token; + return token!; } logApiFullUrlError(String fullUrl, error, code) { diff --git a/lib/core/service/contactus/finadus_service.dart b/lib/core/service/contactus/finadus_service.dart index 8f629db7..4c3f5877 100644 --- a/lib/core/service/contactus/finadus_service.dart +++ b/lib/core/service/contactus/finadus_service.dart @@ -7,9 +7,9 @@ import '../base_service.dart'; class FindusService extends BaseService { - List FindusModelList = List(); - List FindusHospitalModelList = List(); - List FindusPharmaciesModelList = List(); + List FindusModelList =[]; + List FindusHospitalModelList =[]; + List FindusPharmaciesModelList =[]; Map body = Map(); Future getAllFindUsOrders() async { diff --git a/lib/core/service/contactus/livechat_service.dart b/lib/core/service/contactus/livechat_service.dart index 0029e1e9..0b8402af 100644 --- a/lib/core/service/contactus/livechat_service.dart +++ b/lib/core/service/contactus/livechat_service.dart @@ -5,7 +5,7 @@ import 'package:diplomaticquarterapp/core/model/contactus/get_patientI_cprojects import '../base_service.dart'; class LiveChatService extends BaseService { - List LivechatModelList = List(); + List LivechatModelList =[]; Map body = Map(); // body['body'] diff --git a/lib/core/service/er/EdOnlineServices.dart b/lib/core/service/er/EdOnlineServices.dart index 12585e4c..56de8873 100644 --- a/lib/core/service/er/EdOnlineServices.dart +++ b/lib/core/service/er/EdOnlineServices.dart @@ -7,8 +7,8 @@ import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; import 'package:flutter/cupertino.dart'; class EdOnlineServices extends BaseService { - List triageQuestionsModelList = List(); - ErPatientShareModel erPatientShareModel; + List triageQuestionsModelList =[]; + ErPatientShareModel? erPatientShareModel; Future getQuestions() async { hasError = false; @@ -36,25 +36,25 @@ class EdOnlineServices extends BaseService { }, body: Map.from({"ProjectID": 15, "ClinicID": 10})); } - Future saveQuestionsInformation({String notes, String chiefComplaint, int projectId, DateTime selectedTime, List selectedQuestions}) async { + Future saveQuestionsInformation({String? notes, String? chiefComplaint, int? projectId, DateTime? selectedTime, List? selectedQuestions}) async { AppSharedPreferences sharedPref = AppSharedPreferences(); hasError = false; Map body = Map(); - List checklist = List(); + List checklist =[]; body['ProjectID'] = 15; body['ProjectId'] = projectId; int riskScore = 0; if (user.age > 14) { - selectedQuestions.forEach((element) { - int score = int.parse((element.adultPoints != "" ? element.adultPoints : "0")); + selectedQuestions!.forEach((element) { + int score = int.parse((element.adultPoints! != "" ? element.adultPoints! : "0")); riskScore += score; checklist.add(Map.from({"IsSelected": 1, "ParameterCode": element.parameterCode, "ParameterGroup": element.parameterGroup, "ParameterType": element.parameterType, "Score": score})); }); } else { - selectedQuestions.forEach((element) { - int score = int.parse(element.pediaPoints); + selectedQuestions!.forEach((element) { + int score = int.parse(element.pediaPoints!); riskScore += score; checklist.add(Map.from({"IsSelected": 1, "ParameterCode": element.parameterCode, "ParameterGroup": element.parameterGroup, "ParameterType": element.parameterType, "Score": score})); }); diff --git a/lib/core/service/er/am_service.dart b/lib/core/service/er/am_service.dart index c1bae0a9..69c494d2 100644 --- a/lib/core/service/er/am_service.dart +++ b/lib/core/service/er/am_service.dart @@ -10,18 +10,18 @@ import 'package:flutter/cupertino.dart'; import '../base_service.dart'; class AmService extends BaseService { - List amModelList = List(); - List patientAllPresOrdersList = List(); + List amModelList =[]; + List patientAllPresOrdersList =[]; - List patientAmbulanceRequestOrdersList = List(); + List patientAmbulanceRequestOrdersList =[]; bool hasPendingOrder = false; int pendingOrderID = 0; String pendingOrderStatus = ""; String pendingOrderStatusAR = ""; - PickUpRequestPresOrder pickUpRequestPresOrder; + PickUpRequestPresOrder? pickUpRequestPresOrder; - AmbulanceRequestOrdersModel pendingAmbulanceRequestOrder; + AmbulanceRequestOrdersModel? pendingAmbulanceRequestOrder; Future getAllTransportationOrders() async { hasError = false; @@ -51,9 +51,9 @@ class AmService extends BaseService { patientAllPresOrdersList.add(order); if (order.status == 1) { hasPendingOrder = true; - pendingOrderID = order.iD; - pendingOrderStatus = order.description; - pendingOrderStatusAR = order.descriptionN; + pendingOrderID = order.iD!; + pendingOrderStatus = order.description!; + pendingOrderStatusAR = order.descriptionN!; } } }); @@ -109,7 +109,7 @@ class AmService extends BaseService { }, body: body); } - Future updatePressOrder({@required int presOrderID}) async { + Future updatePressOrder({required int presOrderID}) async { hasError = false; Map body = Map(); body['PresOrderID'] = presOrderID; @@ -123,7 +123,7 @@ class AmService extends BaseService { }, body: body); } - Future updatePressOrderRC({@required int presOrderID, @required int patientID}) async { + Future updatePressOrderRC({required int presOrderID, required int patientID}) async { hasError = false; Map body = Map(); body['Id'] = presOrderID; @@ -136,7 +136,7 @@ class AmService extends BaseService { }, body: body); } - Future insertERPressOrder({@required PatientER_RC patientER}) async { + Future insertERPressOrder({required PatientER_RC patientER}) async { hasError = false; var body = patientER.toJson(); await baseAppClient.post(INSERT_TRANSPORTATION_ORDER_RC, isRCService: true, onSuccess: (dynamic response, int statusCode) {}, onFailure: (String error, int statusCode) { diff --git a/lib/core/service/er/er_service.dart b/lib/core/service/er/er_service.dart index 5b7552bb..9e981680 100644 --- a/lib/core/service/er/er_service.dart +++ b/lib/core/service/er/er_service.dart @@ -5,11 +5,11 @@ import 'package:diplomaticquarterapp/core/model/er/projectavgerwaitingtime.dart' import '../base_service.dart'; class ErService extends BaseService { - List projectAvgERWaitingTimeModelList = List(); + List projectAvgERWaitingTimeModelList =[]; Map body = Map(); - Future getProjectAvgERWaitingTimeOrders({int id, int projectID}) async { + Future getProjectAvgERWaitingTimeOrders({int? id, int? projectID}) async { hasError = false; if (id != null && projectID != null) { diff --git a/lib/core/service/feedback/feedback_service.dart b/lib/core/service/feedback/feedback_service.dart index 67ebc641..4a9a0022 100644 --- a/lib/core/service/feedback/feedback_service.dart +++ b/lib/core/service/feedback/feedback_service.dart @@ -9,11 +9,11 @@ import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResu import 'package:diplomaticquarterapp/uitl/utils.dart'; class FeedbackService extends BaseService { - List cOCItemList = List(); + List cOCItemList =[]; RequestInsertCOCItem _requestInsertCOCItem = RequestInsertCOCItem(); - List appointHistoryList = List(); + List appointHistoryList =[]; - Future sendCOCItem({String title, String details, String cOCTypeName, String attachment, AppoitmentAllHistoryResultList appointHistory}) async { + Future sendCOCItem({String? title, String? details, String? cOCTypeName, String? attachment, AppoitmentAllHistoryResultList? appointHistory}) async { hasError = false; var languageID = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar'); diff --git a/lib/core/service/geofencing/GeofencingServices.dart b/lib/core/service/geofencing/GeofencingServices.dart index fe679984..ef565ac6 100644 --- a/lib/core/service/geofencing/GeofencingServices.dart +++ b/lib/core/service/geofencing/GeofencingServices.dart @@ -11,7 +11,7 @@ import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; import 'package:flutter/foundation.dart'; class GeofencingServices extends BaseService { - List geoZones = List(); + List geoZones =[]; bool testZones = true; Future> getAllGeoZones(GeoZonesRequestModel request) async { @@ -37,7 +37,7 @@ class GeofencingServices extends BaseService { return geoZones; } - LogGeoZoneResponseModel logResponse; + LogGeoZoneResponseModel? logResponse; Future logGeoZone(LogGeoZoneRequestModel request) async { hasError = false; @@ -47,6 +47,6 @@ class GeofencingServices extends BaseService { hasError = true; return Future.error(error); }, body: request.toFlatMap()); - return logResponse; + return logResponse!; } } diff --git a/lib/core/service/hospital_service.dart b/lib/core/service/hospital_service.dart index be0024ab..270a1e15 100644 --- a/lib/core/service/hospital_service.dart +++ b/lib/core/service/hospital_service.dart @@ -9,20 +9,19 @@ import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/utils.dart'; import 'package:flutter/material.dart'; import 'package:geolocator/geolocator.dart'; -import 'package:progress_hud_v2/generated/i18n.dart'; class HospitalService extends BaseService { - List _hospitals = List(); + List _hospitals =[]; List get hospitals => _hospitals; - double _latitude; - double _longitude; + double? _latitude; + double? _longitude; _getCurrentLocation() async { if (await PermissionService.isLocationEnabled()) { Geolocator.getLastKnownPosition().then((value) { - _latitude = value.latitude; + _latitude = value!.latitude; _longitude = value.longitude; }).catchError((e) { _longitude = 0; @@ -32,7 +31,7 @@ class HospitalService extends BaseService { if (Platform.isAndroid) { Utils.showPermissionConsentDialog(AppGlobal.context, TranslationBase.of(AppGlobal.context).locationPermissionDialog, () { Geolocator.getLastKnownPosition().then((value) { - _latitude = value.latitude; + _latitude = value!.latitude; _longitude = value.longitude; }).catchError((e) { _longitude = 0; @@ -41,7 +40,7 @@ class HospitalService extends BaseService { }); } else { Geolocator.getLastKnownPosition().then((value) { - _latitude = value.latitude; + _latitude = value!.latitude; _longitude = value.longitude; }).catchError((e) { _longitude = 0; diff --git a/lib/core/service/insurance_service.dart b/lib/core/service/insurance_service.dart index c30c86e7..ec434c78 100644 --- a/lib/core/service/insurance_service.dart +++ b/lib/core/service/insurance_service.dart @@ -15,9 +15,9 @@ import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:flutter/material.dart'; class InsuranceCardService extends BaseService { - List _cardList = List(); - List _cardUpdated = List(); - List _insuranceApproval = List(); + List _cardList =[]; + List _cardUpdated =[]; + List _insuranceApproval =[]; List get cardList => _cardList; @@ -25,8 +25,8 @@ class InsuranceCardService extends BaseService { List get insuranceApproval => _insuranceApproval; - InsuranceCardDetailsModel insuranceCardDetails; - List insuranceCardDetailsList = List(); + InsuranceCardDetailsModel? insuranceCardDetails; + List insuranceCardDetailsList =[]; bool isHaveInsuranceCard = false; GetAllSharedRecordsByStatusResponse getAllSharedRecordsByStatusResponse = GetAllSharedRecordsByStatusResponse(); @@ -68,7 +68,7 @@ class InsuranceCardService extends BaseService { }, body: Map()); } - Future getInsuranceApproval({int appointmentNo}) async { + Future getInsuranceApproval({required int appointmentNo}) async { hasError = false; if (appointmentNo != null) { _requestInsuranceApprovalModel.appointmentNo = appointmentNo; @@ -142,7 +142,7 @@ class InsuranceCardService extends BaseService { return Future.value(localRes); } - Future getPatientInsuranceDetails({String setupID, int projectID, String patientIdentificationID, int patientID, bool isFamily, int parentID = 0}) async { + Future getPatientInsuranceDetails({String? setupID, int? projectID, String? patientIdentificationID, int? patientID, bool? isFamily, int parentID = 0}) async { error = ""; hasError = false; insuranceCardDetails = null; @@ -220,7 +220,7 @@ class InsuranceCardService extends BaseService { return Future.value(localRes); } - Future uploadInsuranceCard(BuildContext context, {String patientIdentificationID, int patientID, String image = ""}) async { + Future uploadInsuranceCard(BuildContext context, {String? patientIdentificationID, int? patientID, String image = ""}) async { error = ""; Map body = Map(); body['PatientID'] = patientID; diff --git a/lib/core/service/medical/ActiveMedicationsService.dart b/lib/core/service/medical/ActiveMedicationsService.dart index f82290b7..eac538bf 100644 --- a/lib/core/service/medical/ActiveMedicationsService.dart +++ b/lib/core/service/medical/ActiveMedicationsService.dart @@ -4,7 +4,7 @@ import 'package:diplomaticquarterapp/core/service/base_service.dart'; class ActiveMedicationsService extends BaseService{ - List activePrescriptionReport = List(); + List activePrescriptionReport =[]; getActiveMedication() async { hasError = false; diff --git a/lib/core/service/medical/AllergiesService.dart b/lib/core/service/medical/AllergiesService.dart index d3deae2b..698f2f48 100644 --- a/lib/core/service/medical/AllergiesService.dart +++ b/lib/core/service/medical/AllergiesService.dart @@ -3,7 +3,7 @@ import 'package:diplomaticquarterapp/core/model/Allergy/Allergy.dart'; import 'package:diplomaticquarterapp/core/service/base_service.dart'; class AllergiesService extends BaseService { - List allergies = List(); + List allergies =[]; getAllergies() async { hasError = false; diff --git a/lib/core/service/medical/BloodPressureService.dart b/lib/core/service/medical/BloodPressureService.dart index 08ca9027..33a0beeb 100644 --- a/lib/core/service/medical/BloodPressureService.dart +++ b/lib/core/service/medical/BloodPressureService.dart @@ -6,14 +6,14 @@ import 'package:diplomaticquarterapp/core/model/my_trakers/blood_pressur/YearBlo import 'package:diplomaticquarterapp/core/service/base_service.dart'; class BloodPressureService extends BaseService { - List monthDiabtectResultAverageList = List(); - List weekDiabtectResultAverageList = List(); - List yearDiabtecResultAverageList = List(); + List monthDiabtectResultAverageList =[]; + List weekDiabtectResultAverageList =[]; + List yearDiabtecResultAverageList =[]; ///Result - List monthDiabtecPatientResult = List(); - List weekDiabtecPatientResult = List(); - List yearDiabtecPatientResult = List(); + List monthDiabtecPatientResult =[]; + List weekDiabtecPatientResult =[]; + List yearDiabtecPatientResult =[]; Future getBloodSugar() async { hasError = false; @@ -84,10 +84,10 @@ class BloodPressureService extends BaseService { } addDiabtecResult( - {String bloodPressureDate, - String diastolicPressure, - String systolicePressure, - int measuredArm}) async { + {String? bloodPressureDate, + String? diastolicPressure, + String? systolicePressure, + int? measuredArm}) async { hasError = false; super.error = ""; @@ -109,11 +109,11 @@ class BloodPressureService extends BaseService { } updateDiabtecResult( - {String bloodPressureDate, - String diastolicPressure, - String systolicePressure, - int lineItemNo, - int measuredArm}) async { + {String? bloodPressureDate, + String? diastolicPressure, + String? systolicePressure, + int? lineItemNo, + int? measuredArm}) async { hasError = false; super.error = ""; @@ -135,7 +135,7 @@ class BloodPressureService extends BaseService { }, body: body); } - Future deactivateDiabeticStatus({int lineItemNo }) async { + Future deactivateDiabeticStatus({int? lineItemNo }) async { hasError = false; super.error = ""; Map body = Map(); diff --git a/lib/core/service/medical/BloodSugarService.dart b/lib/core/service/medical/BloodSugarService.dart index 9c8e9cd9..2cdae441 100644 --- a/lib/core/service/medical/BloodSugarService.dart +++ b/lib/core/service/medical/BloodSugarService.dart @@ -6,14 +6,14 @@ import 'package:diplomaticquarterapp/core/model/my_trakers/blood_sugar/YearDiabt import 'package:diplomaticquarterapp/core/service/base_service.dart'; class BloodSugarService extends BaseService { - List monthDiabtectResultAverageList = List(); - List weekDiabtectResultAverageList = List(); - List yearDiabtecResultAverageList = List(); + List monthDiabtectResultAverageList =[]; + List weekDiabtectResultAverageList =[]; + List yearDiabtecResultAverageList =[]; ///Result - List monthDiabtecPatientResult = List(); - List weekDiabtecPatientResult = List(); - List yearDiabtecPatientResult = List(); + List monthDiabtecPatientResult =[]; + List weekDiabtecPatientResult =[]; + List yearDiabtecPatientResult =[]; Future getBloodSugar() async { hasError = false; @@ -67,14 +67,14 @@ class BloodSugarService extends BaseService { }, body: Map()); } - addDiabtecResult({String bloodSugerDateChart, String bloodSugerResult, String diabtecUnit, int measuredTime}) async { + addDiabtecResult({String? bloodSugerDateChart, String? bloodSugerResult, String? diabtecUnit, int? measuredTime}) async { hasError = false; super.error = ""; Map body = Map(); body['BloodSugerDateChart'] = bloodSugerDateChart; body['BloodSugerResult'] = bloodSugerResult; body['DiabtecUnit'] = diabtecUnit; - body['MeasuredTime'] = measuredTime + 1; + body['MeasuredTime'] = measuredTime! + 1; body['isDentalAllowedBackend'] = false; await baseAppClient.post(ADD_DIABTEC_RESULT, onSuccess: (response, statusCode) async {}, onFailure: (String error, int statusCode) { hasError = true; @@ -82,15 +82,15 @@ class BloodSugarService extends BaseService { }, body: body); } - updateDiabtecResult({DateTime month, DateTime hour, String bloodSugerResult, String diabtecUnit, int measuredTime, int lineItemNo}) async { + updateDiabtecResult({DateTime? month, DateTime? hour, String? bloodSugerResult, String? diabtecUnit, int? measuredTime, int? lineItemNo}) async { hasError = false; super.error = ""; Map body = Map(); body['BloodSugerResult'] = bloodSugerResult; body['DiabtecUnit'] = diabtecUnit; - body['BloodSugerDateChart'] = '${month.year}-${month.month}-${month.day} ${hour.hour}:${hour.minute}:00'; + body['BloodSugerDateChart'] = '${month!.year}-${month.month}-${month.day} ${hour!.hour}:${hour.minute}:00'; body['isDentalAllowedBackend'] = false; - body['MeasuredTime'] = measuredTime + 1; + body['MeasuredTime'] = measuredTime! + 1; body['LineItemNo'] = lineItemNo; await baseAppClient.post(UPDATE_DIABETIC_RESULT, onSuccess: (response, statusCode) async {}, onFailure: (String error, int statusCode) { hasError = true; @@ -110,7 +110,7 @@ class BloodSugarService extends BaseService { }, body: body); } - Future deactivateDiabeticStatus({int lineItemNo}) async { + Future deactivateDiabeticStatus({int? lineItemNo}) async { hasError = false; super.error = ""; Map body = Map(); diff --git a/lib/core/service/medical/EyeService.dart b/lib/core/service/medical/EyeService.dart index 937f89e3..71dfdec4 100644 --- a/lib/core/service/medical/EyeService.dart +++ b/lib/core/service/medical/EyeService.dart @@ -4,7 +4,7 @@ import 'package:diplomaticquarterapp/core/service/base_service.dart'; import 'package:diplomaticquarterapp/uitl/utils.dart'; class EyeService extends BaseService { - List appoimentAllHistoryResultList = List(); + List appoimentAllHistoryResultList = []; getEyeMeasurement() async { hasError = false; @@ -12,12 +12,10 @@ class EyeService extends BaseService { Map body = Map(); body['isDentalAllowedBackend'] = false; body['IsIrisPrescription'] = true; - await baseAppClient.post(GET_PATIENT_APPOINTMENT_HISTORY, - onSuccess: (response, statusCode) async { + await baseAppClient.post(GET_PATIENT_APPOINTMENT_HISTORY, onSuccess: (response, statusCode) async { appoimentAllHistoryResultList.clear(); response['AppoimentAllHistoryResultList'].forEach((appoitment) { - appoimentAllHistoryResultList - .add(AppoimentAllHistoryResultList.fromJson(appoitment)); + appoimentAllHistoryResultList.add(AppoimentAllHistoryResultList.fromJson(appoitment)); }); }, onFailure: (String error, int statusCode) { hasError = true; @@ -25,13 +23,13 @@ class EyeService extends BaseService { }, body: body); } - sendGlassesPrescriptionEmail({int appointmentNo,String projectName,int projectID}) async { + sendGlassesPrescriptionEmail({int? appointmentNo, String? projectName, int? projectID}) async { hasError = false; super.error = ""; 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; @@ -40,23 +38,20 @@ class EyeService extends BaseService { body['ProjectName'] = projectName; body['PatientID'] = user.patientID; 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; - }, body: body); + await baseAppClient.post(SEND_REPORT_EYE_EMAIL, onSuccess: (response, statusCode) async {}, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: body); } - sendContactLensPrescriptionEmail({int appointmentNo,String projectName,int projectID}) async { + sendContactLensPrescriptionEmail({int? appointmentNo, String? projectName, int? projectID}) async { hasError = false; super.error = ""; Map body = Map(); 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; @@ -65,12 +60,9 @@ class EyeService extends BaseService { body['ProjectName'] = projectName; body['PatientID'] = user.patientID; 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; - }, body: body); + await baseAppClient.post(SEND_CONTACT_LENS_PRESCRIPTION_EMAIL, onSuccess: (response, statusCode) async {}, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: body); } } diff --git a/lib/core/service/medical/PatientSickLeaveService.dart b/lib/core/service/medical/PatientSickLeaveService.dart index 10d30606..17ca1e8e 100644 --- a/lib/core/service/medical/PatientSickLeaveService.dart +++ b/lib/core/service/medical/PatientSickLeaveService.dart @@ -3,7 +3,7 @@ import 'package:diplomaticquarterapp/core/model/sick_leave/sick_leave.dart'; import 'package:diplomaticquarterapp/core/service/base_service.dart'; class PatientSickLeaveService extends BaseService { - List sickLeaveList = List(); + List sickLeaveList =[]; getSickLeave() async { hasError = false; @@ -21,11 +21,11 @@ class PatientSickLeaveService extends BaseService { } sendSickLeaveEmail( - {int requestNo, - String projectName, - String doctorName, - int projectID, - String setupID}) async { + {required int requestNo, + required String projectName, + required String doctorName, + required int projectID, + required String setupID}) async { hasError = false; super.error = ""; Map body = Map(); diff --git a/lib/core/service/medical/WeightPressureService.dart b/lib/core/service/medical/WeightPressureService.dart index 5cfcc35c..7246bfbe 100644 --- a/lib/core/service/medical/WeightPressureService.dart +++ b/lib/core/service/medical/WeightPressureService.dart @@ -7,14 +7,14 @@ import 'package:diplomaticquarterapp/core/service/base_service.dart'; class WeightService extends BaseService { ///Average - List monthWeightMeasurementResultAverage = List(); - List weekWeightMeasurementResultAverage = List(); - List yearWeightMeasurementResultAverage = List(); + List monthWeightMeasurementResultAverage =[]; + List weekWeightMeasurementResultAverage =[]; + List yearWeightMeasurementResultAverage =[]; ///Result - List monthWeightMeasurementResult = List(); - List weekWeightMeasurementResult = List(); - List yearWeightMeasurementResult = List(); + List monthWeightMeasurementResult =[]; + List weekWeightMeasurementResult =[]; + List yearWeightMeasurementResult =[]; Future getWeightAverage() async { hasError = false; @@ -65,7 +65,7 @@ class WeightService extends BaseService { }, body: Map()); } - addWeightResult({String weightDate, String weightMeasured, int weightUnit}) async { + addWeightResult({required String weightDate, required String weightMeasured, required int weightUnit}) async { hasError = false; super.error = ""; @@ -82,7 +82,7 @@ class WeightService extends BaseService { }, body: body); } - updateWeightResult({int lineItemNo, int weightUnit, String weightMeasured, String weightDate}) async { + updateWeightResult({required int lineItemNo, required int weightUnit, required String weightMeasured, required String weightDate}) async { hasError = false; super.error = ""; Map body = Map(); @@ -113,7 +113,7 @@ class WeightService extends BaseService { } deleteWeightResult({ - int lineItemNo, + required int lineItemNo, }) async { hasError = false; super.error = ""; diff --git a/lib/core/service/medical/ask_doctor_services.dart b/lib/core/service/medical/ask_doctor_services.dart index bc3c5b62..9491354a 100644 --- a/lib/core/service/medical/ask_doctor_services.dart +++ b/lib/core/service/medical/ask_doctor_services.dart @@ -8,10 +8,10 @@ import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; class AskDoctorService extends BaseService { - List askDoctorReqTypes = List(); - List doctorResponseList = List(); + List askDoctorReqTypes =[]; + List doctorResponseList =[]; - Future getCallInfoHoursResult({int projectId, int doctorId}) async { + Future getCallInfoHoursResult({int? projectId, int? doctorId}) async { hasError = false; Map body = Map(); body['isDentalAllowedBackend'] = false; @@ -76,7 +76,7 @@ class AskDoctorService extends BaseService { }, body: body); } - Future updateReadStatus({int transactionNo}) async { + Future updateReadStatus({int? transactionNo}) async { hasError = false; Map body = Map(); body['isDentalAllowedBackend'] = false; @@ -89,10 +89,10 @@ class AskDoctorService extends BaseService { }, body: body); } - Future sendRequestLOV({DoctorList doctorList, String requestType, String remark}) async { + Future sendRequestLOV({DoctorList? doctorList, String? requestType, String? remark}) async { hasError = false; Map body = Map(); - body['ProjectID'] = doctorList.projectID; + body['ProjectID'] = doctorList!.projectID; body['SetupID'] = doctorList.setupID; body['DoctorID'] = doctorList.doctorID; body['PatientMobileNumber'] = user.mobileNumber; @@ -108,7 +108,7 @@ class AskDoctorService extends BaseService { body['isDentalAllowedBackend'] = false; body['AppointmentNo'] = doctorList.appointmentNo; body['ClinicID'] = doctorList.clinicID; - body['QuestionType'] = num.parse(requestType); + body['QuestionType'] = num.parse(requestType!); body['RequestType'] = num.parse(requestType); body['RequestTypeID'] = num.parse(requestType); @@ -118,7 +118,7 @@ class AskDoctorService extends BaseService { }, body: body); } - Future rateDoctorResponse({int transactionNo, int questionType, int rate, String notes, String mobileNo, String idNo, String patientName, int projectID, String language}) async { + Future rateDoctorResponse({int? transactionNo, int? questionType, int? rate, String? notes, String? mobileNo, String? idNo, String? patientName, int? projectID, String? language}) async { hasError = false; dynamic localRes; Map body = Map(); diff --git a/lib/core/service/medical/labs_service.dart b/lib/core/service/medical/labs_service.dart index 15337576..c39db57a 100644 --- a/lib/core/service/medical/labs_service.dart +++ b/lib/core/service/medical/labs_service.dart @@ -9,7 +9,7 @@ import 'package:diplomaticquarterapp/core/service/base_service.dart'; import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart'; class LabsService extends BaseService { - List patientLabOrdersList = List(); + List patientLabOrdersList =[]; String labReportPDF = ""; @@ -30,16 +30,16 @@ class LabsService extends BaseService { RequestPatientLabSpecialResult _requestPatientLabSpecialResult = RequestPatientLabSpecialResult(); - List patientLabSpecialResult = List(); - List labResultList = List(); - List labOrdersResultsList = List(); + List patientLabSpecialResult =[]; + List labResultList =[]; + List labOrdersResultsList =[]; - Future getLaboratoryResult({String projectID, int clinicID, String invoiceNo, String orderNo, String setupID, bool isVidaPlus}) async { + Future getLaboratoryResult({String? projectID, int? clinicID, String? invoiceNo, String? orderNo, String? setupID, bool? isVidaPlus}) async { hasError = false; _requestPatientLabSpecialResult.projectID = projectID; _requestPatientLabSpecialResult.clinicID = clinicID; - _requestPatientLabSpecialResult.invoiceNo = isVidaPlus ? "0" : invoiceNo; + _requestPatientLabSpecialResult.invoiceNo = isVidaPlus! ? "0" : invoiceNo; _requestPatientLabSpecialResult.invoiceNoVP = isVidaPlus ? invoiceNo : "0"; _requestPatientLabSpecialResult.orderNo = orderNo; @@ -56,12 +56,12 @@ class LabsService extends BaseService { }, body: _requestPatientLabSpecialResult.toJson()); } - Future getPatientLabResult({PatientLabOrders patientLabOrder, bool isVidaPlus}) async { + Future getPatientLabResult({PatientLabOrders? patientLabOrder, bool? isVidaPlus}) async { hasError = false; Map body = Map(); - body['InvoiceNo_VP'] = isVidaPlus ? patientLabOrder.invoiceNo : "0"; - body['InvoiceNo'] = isVidaPlus ? "0" : patientLabOrder.invoiceNo; - body['OrderNo'] = patientLabOrder.orderNo; + body['InvoiceNo_VP'] = isVidaPlus! ? patientLabOrder!.invoiceNo : "0"; + body['InvoiceNo'] = isVidaPlus ? "0" : patientLabOrder!.invoiceNo; + body['OrderNo'] = patientLabOrder!.orderNo; body['isDentalAllowedBackend'] = false; body['SetupID'] = patientLabOrder.setupID; body['ProjectID'] = patientLabOrder.projectID; @@ -177,11 +177,11 @@ class LabsService extends BaseService { return Future.value(localRes); } - Future getPatientLabOrdersResults({PatientLabOrders patientLabOrder, String procedure}) async { + Future getPatientLabOrdersResults({PatientLabOrders? patientLabOrder, String? procedure}) async { hasError = false; Map body = Map(); body['InvoiceNo'] = "0"; - body['InvoiceNo_VP'] = patientLabOrder.invoiceNo; + body['InvoiceNo_VP'] = patientLabOrder!.invoiceNo; body['OrderNo'] = patientLabOrder.orderNo; body['isDentalAllowedBackend'] = false; body['SetupID'] = patientLabOrder.setupID; @@ -201,17 +201,17 @@ class LabsService extends BaseService { RequestSendLabReportEmail _requestSendLabReportEmail = RequestSendLabReportEmail(); - Future sendLabReportEmail({PatientLabOrders patientLabOrder, AuthenticatedUser userObj, bool isVidaPlus, bool isDownload = false}) async { - _requestSendLabReportEmail.projectID = patientLabOrder.projectID; + Future sendLabReportEmail({PatientLabOrders? patientLabOrder, AuthenticatedUser? userObj, bool isVidaPlus = false, bool isDownload = false}) async { + _requestSendLabReportEmail.projectID = patientLabOrder!.projectID; _requestSendLabReportEmail.invoiceNo = isVidaPlus ? "0" : patientLabOrder.invoiceNo; _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; - _requestSendLabReportEmail.orderDate = '${patientLabOrder.orderDate.year}-${patientLabOrder.orderDate.month}-${patientLabOrder.orderDate.day}'; + _requestSendLabReportEmail.orderDate = '${patientLabOrder.orderDate!.year}-${patientLabOrder.orderDate!.month}-${patientLabOrder.orderDate!.day}'; _requestSendLabReportEmail.patientMobileNumber = userObj.mobileNumber; _requestSendLabReportEmail.projectName = patientLabOrder.projectName; _requestSendLabReportEmail.setupID = patientLabOrder.setupID; diff --git a/lib/core/service/medical/medical_service.dart b/lib/core/service/medical/medical_service.dart index c8f29e44..d3b131da 100644 --- a/lib/core/service/medical/medical_service.dart +++ b/lib/core/service/medical/medical_service.dart @@ -8,8 +8,8 @@ import 'package:diplomaticquarterapp/pages/MyAppointments/models/DoctorScheduleR import 'package:flutter/cupertino.dart'; class MedicalService extends BaseService { - List appoitmentAllHistoryResultList = List(); - List doctorScheduleResponse = List(); + List appoitmentAllHistoryResultList =[]; + List doctorScheduleResponse =[]; List freeSlots = []; getAppointmentHistory({bool isActiveAppointment = false}) async { hasError = false; @@ -39,7 +39,7 @@ class MedicalService extends BaseService { } } - addAmbulanceRequest({@required PatientER patientER}) async { + addAmbulanceRequest({required PatientER patientER}) async { hasError = false; super.error = ""; Map body = Map(); diff --git a/lib/core/service/medical/my_balance_service.dart b/lib/core/service/medical/my_balance_service.dart index 04f0bd09..e3b44586 100644 --- a/lib/core/service/medical/my_balance_service.dart +++ b/lib/core/service/medical/my_balance_service.dart @@ -15,21 +15,21 @@ import 'package:diplomaticquarterapp/services/family_files/family_files_provider import 'package:diplomaticquarterapp/uitl/app_toast.dart'; class MyBalanceService extends BaseService { - List patientAdvanceBalanceAmountList = List(); + List patientAdvanceBalanceAmountList =[]; dynamic totalAdvanceBalanceAmount; - List patientInfoList = List(); + List patientInfoList =[]; GetAllSharedRecordsByStatusResponse getAllSharedRecordsByStatusResponse = GetAllSharedRecordsByStatusResponse(); - PatientInfoAndMobileNumber patientInfoAndMobileNumber; - String logInTokenID; - String verificationCode; + PatientInfoAndMobileNumber? patientInfoAndMobileNumber; + String? logInTokenID; + String? verificationCode; String updatedRegisterBloodMessage = ""; AuthenticatedUserObject authenticatedUserObject = locator(); - MyBalanceService() { - // getFamilyFiles(); - } + // MyBalanceService() { + // // getFamilyFiles(); + // } getPatientAdvanceBalanceAmount() async { hasError = false; @@ -48,7 +48,7 @@ class MyBalanceService extends BaseService { }, body: Map()); } - getPatientInfoByPatientID({String id}) async { + getPatientInfoByPatientID({required String id}) async { hasError = false; super.error = ""; Map body = Map(); @@ -72,7 +72,7 @@ class MyBalanceService extends BaseService { Map body = Map(); body['isDentalAllowedBackend'] = false; body['MobileNo'] = advanceModel.mobileNumber; - body['ProjectID'] = advanceModel.hospitalsModel.iD; + body['ProjectID'] = advanceModel.hospitalsModel!.iD; body['PatientID'] = advanceModel.fileNumber; await baseAppClient.post(GET_PATIENT_INFO_BY_ID_AND_MOBILE_NUMBER, @@ -87,7 +87,7 @@ class MyBalanceService extends BaseService { }, body: body); } - sendActivationCodeForAdvancePayment({int patientID, int projectID}) async { + sendActivationCodeForAdvancePayment({required int patientID, required int projectID}) async { hasError = false; super.error = ""; Map body = Map(); @@ -106,7 +106,7 @@ class MyBalanceService extends BaseService { }, body: body); } - checkActivationCodeForAdvancePayment({String activationCode}) async { + checkActivationCodeForAdvancePayment({required String activationCode}) async { hasError = false; super.error = ""; Map body = Map(); @@ -141,7 +141,7 @@ class MyBalanceService extends BaseService { } catch (error) { print(error); hasError = true; - super.error = error; + super.error = error.toString(); } } diff --git a/lib/core/service/medical/my_doctor_service.dart b/lib/core/service/medical/my_doctor_service.dart index 3d9e14b7..2f08f07c 100644 --- a/lib/core/service/medical/my_doctor_service.dart +++ b/lib/core/service/medical/my_doctor_service.dart @@ -8,9 +8,9 @@ import 'package:diplomaticquarterapp/core/service/base_service.dart'; import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart'; class MyDoctorService extends BaseService { - List patientDoctorAppointmentList = List(); - DoctorProfile doctorProfile; - DoctorList doctorList; + List patientDoctorAppointmentList =[]; + DoctorProfile? doctorProfile; + DoctorList? doctorList; DoctorRating doctorRating = DoctorRating(); RequestPatientDoctorAppointment patientDoctorAppointmentRequest = @@ -49,7 +49,7 @@ class MyDoctorService extends BaseService { ); Future getDoctorProfileAndRating( - {int doctorId, int clinicID, int projectID}) async { + {required int doctorId, required int clinicID, required int projectID}) async { ///GET DOCTOR PROFILE _requestDoctorProfile.doctorID = doctorId; _requestDoctorProfile.clinicID = clinicID; @@ -59,10 +59,10 @@ class MyDoctorService extends BaseService { onSuccess: (dynamic response, int statusCode) { doctorProfile = DoctorProfile.fromJson(response['DoctorProfileList'][0]); doctorList = DoctorList.fromJson(response['DoctorProfileList'][0]); - doctorList.clinicName = doctorProfile.clinicDescription; - doctorList.doctorTitle = doctorProfile.doctorTitleForProfile; - doctorList.name = doctorProfile.doctorName; - doctorList.projectName = doctorProfile.projectName; + doctorList!.clinicName = doctorProfile!.clinicDescription!; + doctorList!.doctorTitle = doctorProfile!.doctorTitleForProfile!; + doctorList!.name = doctorProfile!.doctorName!; + doctorList!.projectName = doctorProfile!.projectName!; }, onFailure: (String error, int statusCode) { hasError = true; super.error = error; diff --git a/lib/core/service/medical/prescriptions_service.dart b/lib/core/service/medical/prescriptions_service.dart index 01ea61e3..672976cf 100644 --- a/lib/core/service/medical/prescriptions_service.dart +++ b/lib/core/service/medical/prescriptions_service.dart @@ -16,10 +16,10 @@ import 'package:diplomaticquarterapp/core/service/base_service.dart'; import 'package:flutter/cupertino.dart'; class PrescriptionsService extends BaseService { - List prescriptionsList = List(); - List prescriptionReportListINP = List(); - List prescriptionsOrderList = List(); - List prescriptionsOrderListRC = List(); + List prescriptionsList =[]; + List prescriptionReportListINP =[]; + List prescriptionsOrderList =[]; + List prescriptionsOrderListRC =[]; var isMedDeliveryAllowed; Future getPrescriptions() async { @@ -80,9 +80,9 @@ class PrescriptionsService extends BaseService { } RequestPrescriptionReport _requestPrescriptionReport = RequestPrescriptionReport(appointmentNo: 0, isDentalAllowedBackend: false); - List prescriptionReportList = List(); + List prescriptionReportList =[]; - Future getPrescriptionReport({Prescriptions prescriptions}) async { + Future getPrescriptionReport({required Prescriptions prescriptions}) async { hasError = false; if (prescriptions.isInOutPatient == false) { _requestPrescriptionReport.dischargeNo = prescriptions.dischargeNo; @@ -95,11 +95,11 @@ class PrescriptionsService extends BaseService { _requestPrescriptionReport.episodeID = prescriptions.episodeID; _requestPrescriptionReport.appointmentNo = prescriptions.appointmentNo; - await baseAppClient.post(prescriptions.isInOutPatient ? GET_PRESCRIPTION_REPORT_ENH : GET_PRESCRIPTION_REPORT, onSuccess: (dynamic response, int statusCode) { + await baseAppClient.post(prescriptions.isInOutPatient! ? GET_PRESCRIPTION_REPORT_ENH : GET_PRESCRIPTION_REPORT, onSuccess: (dynamic response, int statusCode) { prescriptionReportList.clear(); prescriptionReportEnhList.clear(); isMedDeliveryAllowed = response['IsHomeMedicineDeliverySupported']; - if (prescriptions.isInOutPatient) { + if (prescriptions.isInOutPatient!) { response['ListPRM'].forEach((prescriptions) { prescriptionReportList.add(PrescriptionReport.fromJson(prescriptions)); prescriptionReportEnhList.add(PrescriptionReportEnh.fromJson(prescriptions)); @@ -147,9 +147,9 @@ class PrescriptionsService extends BaseService { longitude: 0, isDentalAllowedBackend: false, ); - List pharmacyPrescriptionsList = List(); + List pharmacyPrescriptionsList =[]; - Future getListPharmacyForPrescriptions({int itemId}) async { + Future getListPharmacyForPrescriptions({required int itemId}) async { hasError = false; requestGetListPharmacyForPrescriptions.itemID = itemId; @@ -175,9 +175,9 @@ class PrescriptionsService extends BaseService { isDentalAllowedBackend: false, ); - List prescriptionReportEnhList = List(); + List prescriptionReportEnhList =[]; - Future getPrescriptionReportEnh({PrescriptionsOrder prescriptionsOrder}) async { + Future getPrescriptionReportEnh({required PrescriptionsOrder prescriptionsOrder}) async { bool isInPatient = false; prescriptionsList.forEach((element) { if (prescriptionsOrder.appointmentNo == "0") { @@ -188,7 +188,7 @@ class PrescriptionsService extends BaseService { _requestPrescriptionReportEnh.episodeID = element.episodeID; _requestPrescriptionReportEnh.setupID = element.setupID; _requestPrescriptionReportEnh.dischargeNo = element.dischargeNo; - isInPatient = element.isInOutPatient; + isInPatient = element.isInOutPatient!; } } else { if (int.parse(prescriptionsOrder.appointmentNo) == element.appointmentNo) { @@ -198,7 +198,7 @@ class PrescriptionsService extends BaseService { _requestPrescriptionReportEnh.episodeID = element.episodeID; _requestPrescriptionReportEnh.setupID = element.setupID; _requestPrescriptionReportEnh.dischargeNo = element.dischargeNo; - isInPatient = element.isInOutPatient; + isInPatient = element.isInOutPatient!; } } }); @@ -225,7 +225,7 @@ class PrescriptionsService extends BaseService { }, body: _requestPrescriptionReportEnh.toJson()); } - Future updatePressOrderRC({@required int presOrderID}) async { + Future updatePressOrderRC({required int presOrderID}) async { hasError = false; Map body = Map(); body['Id'] = presOrderID; @@ -237,7 +237,7 @@ class PrescriptionsService extends BaseService { }, body: body); } - Future updatePressOrder({@required int presOrderID}) async { + Future updatePressOrder({required int presOrderID}) async { hasError = false; Map body = Map(); body['PresOrderID'] = presOrderID; diff --git a/lib/core/service/medical/radiology_service.dart b/lib/core/service/medical/radiology_service.dart index f2a54c0c..548cb69d 100644 --- a/lib/core/service/medical/radiology_service.dart +++ b/lib/core/service/medical/radiology_service.dart @@ -5,15 +5,15 @@ import 'package:diplomaticquarterapp/core/service/base_service.dart'; import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart'; class RadiologyService extends BaseService { - List finalRadiologyList = List(); + List finalRadiologyList = []; String url = ''; bool isRadiologyVIDAPlus = false; - Future getRadImageURL({int invoiceNo, int lineItem, int projectId, bool isVidaPlus}) async { + Future getRadImageURL({int? invoiceNo, int? lineItem, int? projectId, bool? isVidaPlus}) async { hasError = false; final Map body = new Map(); - body['InvoiceNo'] = isVidaPlus ? "0" : invoiceNo; + body['InvoiceNo'] = isVidaPlus! ? "0" : invoiceNo; body['InvoiceNo_VP'] = isVidaPlus ? invoiceNo : "0"; body['LineItemNo'] = lineItem; body['ProjectID'] = projectId; @@ -63,16 +63,16 @@ class RadiologyService extends BaseService { RequestSendRadReportEmail _requestSendRadReportEmail = RequestSendRadReportEmail(); - Future sendRadReportEmail({FinalRadiology finalRadiology, AuthenticatedUser userObj}) async { - _requestSendRadReportEmail.projectID = finalRadiology.projectID; + Future sendRadReportEmail({FinalRadiology? finalRadiology, AuthenticatedUser? userObj}) async { + _requestSendRadReportEmail.projectID = finalRadiology!.projectID; _requestSendRadReportEmail.clinicName = finalRadiology.clinicDescription; _requestSendRadReportEmail.invoiceNo = finalRadiology.invoiceNo; _requestSendRadReportEmail.invoiceNo_VP = finalRadiology.invoiceNo_VP; _requestSendRadReportEmail.invoiceLineItemNo = finalRadiology.invoiceLineItemNo; _requestSendRadReportEmail.setupID = finalRadiology.setupID; _requestSendRadReportEmail.doctorName = finalRadiology.doctorName; - _requestSendRadReportEmail.orderDate = '${finalRadiology.orderDate.year}-${finalRadiology.orderDate.month}-${finalRadiology.orderDate.day}'; - _requestSendRadReportEmail.patientIditificationNum = userObj.patientIdentificationNo; + _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.projectName = finalRadiology.projectName; diff --git a/lib/core/service/medical/reports_monthly_service.dart b/lib/core/service/medical/reports_monthly_service.dart index 479360ac..280a2246 100644 --- a/lib/core/service/medical/reports_monthly_service.dart +++ b/lib/core/service/medical/reports_monthly_service.dart @@ -5,8 +5,8 @@ import 'package:diplomaticquarterapp/core/service/base_service.dart'; import 'package:diplomaticquarterapp/pages/feedback/appointment_history.dart'; class ReportsMonthlyService extends BaseService { - List reportsList = List(); - List appointHistoryList = List(); + List reportsList =[]; + List appointHistoryList =[]; RequestReports _requestReports = RequestReports( isReport: true, diff --git a/lib/core/service/medical/reports_service.dart b/lib/core/service/medical/reports_service.dart index c533c168..8e632627 100644 --- a/lib/core/service/medical/reports_service.dart +++ b/lib/core/service/medical/reports_service.dart @@ -83,7 +83,7 @@ class ReportsService extends BaseService { }, body: Map()); } - Future updatePatientHealthSummaryReport({bool isSummary}) async { + Future updatePatientHealthSummaryReport({required bool isSummary}) async { Map body = Map(); body['RSummaryReport'] = isSummary; hasError = false; @@ -93,7 +93,7 @@ class ReportsService extends BaseService { }, body: body); } - Future updateEmail({String email}) async { + Future updateEmail({required String email}) async { Map body = Map(); body['EmailAddress'] = email; body['isDentalAllowedBackend'] = false; diff --git a/lib/core/service/medical/vital_sign_service.dart b/lib/core/service/medical/vital_sign_service.dart index d1fbbf1c..0d2f051c 100644 --- a/lib/core/service/medical/vital_sign_service.dart +++ b/lib/core/service/medical/vital_sign_service.dart @@ -4,13 +4,13 @@ import 'package:diplomaticquarterapp/core/model/vital_sign/vital_sign_res_model. import '../base_service.dart'; class VitalSignService extends BaseService { - List vitalSignResModelList = List(); + List vitalSignResModelList =[]; String weightKg = ""; String heightCm = ""; String bloadType = ""; - Future getPatientRadOrders({int appointmentNo, int projectID}) async { + Future getPatientRadOrders({required int appointmentNo, required int projectID}) async { hasError = false; Map body = Map(); if (appointmentNo != null && projectID != null) { diff --git a/lib/core/service/notifications_service.dart b/lib/core/service/notifications_service.dart index f2cac55e..ad6cbce1 100644 --- a/lib/core/service/notifications_service.dart +++ b/lib/core/service/notifications_service.dart @@ -5,7 +5,7 @@ import 'package:diplomaticquarterapp/core/model/notifications/mark_message_as_re import 'package:diplomaticquarterapp/core/service/base_service.dart'; class NotificationService extends BaseService { - List notificationsList = List(); + List notificationsList =[]; Future getAllNotifications(GetNotificationsRequestModel getNotificationsRequestModel ) async { hasError = false; diff --git a/lib/core/service/offers_service.dart b/lib/core/service/offers_service.dart index 8007007b..19b68707 100644 --- a/lib/core/service/offers_service.dart +++ b/lib/core/service/offers_service.dart @@ -5,9 +5,9 @@ import 'package:diplomaticquarterapp/core/model/pharmacy/offers_model.dart'; import 'base_service.dart'; class OffersCategoriseService extends BaseService { - List _offersList = List(); + List _offersList =[]; List get offersList => _offersList; - List _offerProducts = List(); + List _offerProducts =[]; List get offersProducts => _offerProducts; clearCategorise() { @@ -35,7 +35,7 @@ class OffersCategoriseService extends BaseService { ); } - Future getOffersProducts({String id}) async { + Future getOffersProducts({required String id}) async { hasError = false; _offerProducts.clear(); String endPoint = diff --git a/lib/core/service/packages_offers/PackagesOffersServices.dart b/lib/core/service/packages_offers/PackagesOffersServices.dart index 67ce6b39..02d19e73 100644 --- a/lib/core/service/packages_offers/PackagesOffersServices.dart +++ b/lib/core/service/packages_offers/PackagesOffersServices.dart @@ -24,7 +24,7 @@ import 'package:flutter/cupertino.dart'; Map packagesAuthHeader = {}; class OffersAndPackagesServices extends BaseService { - AuthenticatedUser patientUser; + AuthenticatedUser? patientUser; List categoryList = []; List projectsList = []; List productList = []; @@ -35,14 +35,14 @@ class OffersAndPackagesServices extends BaseService { List ordersHistory = []; List cartItemList = []; List _hospitals = []; + List get hospitals => _hospitals; String cartItemCount = ""; - PackagesCustomerResponseModel customer; + PackagesCustomerResponseModel? customer; Future> getAllCategories(OffersCategoriesRequestModel request) async { - if(categoryList.isNotEmpty) - return categoryList; + if (categoryList.isNotEmpty) return categoryList; var url = EXA_CART_API_BASE_URL + PACKAGES_CATEGORIES; await baseAppClient.simpleGet(url, headers: packagesAuthHeader, onSuccess: (dynamic stringResponse, int statusCode) { @@ -58,24 +58,23 @@ class OffersAndPackagesServices extends BaseService { } Future> getAllStores() async { - if(projectsList.isNotEmpty) - return projectsList; + if (projectsList.isNotEmpty) return projectsList; var url = EXA_CART_API_BASE_URL + PACKAGES_STORES; await baseAppClient.simpleGet(url, headers: packagesAuthHeader, onSuccess: (dynamic stringResponse, int statusCode) { if (statusCode == 200) { var jsonResponse = json.decode(stringResponse); final response = OfferProjectsResponseModel.fromJson(jsonResponse); - projectsList = response.project; + projectsList = response.project!; } }, onFailure: (String error, int statusCode) { throw error; - }, queryParams: {'fields' : 'id,name'}); + }, queryParams: {'fields': 'id,name'}); return projectsList; } - Future> getAllProducts({@required OffersProductsRequestModel request, @required BuildContext context, @required bool showLoading = true, bool byOffset = true}) async { + Future> getAllProducts({required OffersProductsRequestModel request, required BuildContext context, bool showLoading = true, bool byOffset = true}) async { Future errorThrow; productList = []; var url = EXA_CART_API_BASE_URL + PACKAGES_PRODUCTS; @@ -91,7 +90,7 @@ class OffersAndPackagesServices extends BaseService { return productList; } - Future> getTamaraOptions({@required BuildContext context, @required bool showLoading = true}) async { + Future> getTamaraOptions({required BuildContext context, bool showLoading = true}) async { if (tamaraPaymentOptions != null && tamaraPaymentOptions.isNotEmpty) return tamaraPaymentOptions; tamaraPaymentOptions.clear(); @@ -110,7 +109,7 @@ class OffersAndPackagesServices extends BaseService { return tamaraPaymentOptions; } - Future> getLatestOffers({@required OffersProductsRequestModel request, @required BuildContext context, @required bool showLoading = true}) async { + Future> getLatestOffers({required OffersProductsRequestModel request, required BuildContext context, bool showLoading = true}) async { var url = EXA_CART_API_BASE_URL + PACKAGES_PRODUCTS; await baseAppClient.simpleGet(url, headers: packagesAuthHeader, onSuccess: (dynamic stringResponse, int statusCode) { latestOffersList.clear(); @@ -127,7 +126,7 @@ class OffersAndPackagesServices extends BaseService { return latestOffersList; } - Future> getBestSellers({@required OffersProductsRequestModel request, @required BuildContext context, @required bool showLoading = true}) async { + Future> getBestSellers({required OffersProductsRequestModel request, required BuildContext context, bool showLoading = true}) async { var url = EXA_CART_API_BASE_URL + PACKAGES_PRODUCTS; await baseAppClient.simpleGet(url, headers: packagesAuthHeader, onSuccess: (dynamic stringResponse, int statusCode) { bestSellerList.clear(); @@ -144,7 +143,7 @@ class OffersAndPackagesServices extends BaseService { return bestSellerList; } - Future> getBanners({@required OffersProductsRequestModel request, @required BuildContext context, @required bool showLoading = true}) async { + Future> getBanners({required OffersProductsRequestModel request, required BuildContext context, bool showLoading = true}) async { var url = EXA_CART_API_BASE_URL + PACKAGES_PRODUCTS; await baseAppClient.simpleGet(url, headers: packagesAuthHeader, onSuccess: (dynamic stringResponse, int statusCode) { if (statusCode == 200) { @@ -160,7 +159,7 @@ class OffersAndPackagesServices extends BaseService { return bannersList; } - Future loadOffersPackagesDataForMainPage({@required BuildContext context, bool showLoading = true, Function completion}) async { + Future loadOffersPackagesDataForMainPage({required BuildContext context, bool showLoading = true, required Function completion}) async { var finished = 0; var totalCalls = 2; @@ -184,7 +183,7 @@ class OffersAndPackagesServices extends BaseService { if (patientUser != null) { customer = await getCurrentCustomer(context: context, showLoading: showLoading); if (customer == null) { - createCustomer(PackagesCustomerRequestModel.fromUser(patientUser), context: context); + createCustomer(PackagesCustomerRequestModel.fromUser(patientUser!), context: context); } } @@ -212,11 +211,11 @@ class OffersAndPackagesServices extends BaseService { // -------------------- // Create Customer // -------------------- - Future createCustomer(PackagesCustomerRequestModel request, {@required BuildContext context, bool showLoading = true, Function(bool) completion}) async { + Future createCustomer(PackagesCustomerRequestModel request, {required BuildContext context, bool showLoading = true, Function(bool)? completion}) async { if (customer != null) return Future.value(customer); customer = null; - Future errorThrow; + Future? errorThrow; _showLoading(context, showLoading); var url = EXA_CART_API_BASE_URL + PACKAGES_CUSTOMER; @@ -235,11 +234,11 @@ class OffersAndPackagesServices extends BaseService { return errorThrow ?? customer; } - Future getCurrentCustomer({@required BuildContext context, bool showLoading = true}) async { + Future getCurrentCustomer({required BuildContext context, bool showLoading = true}) async { if (customer != null) return Future.value(customer); _showLoading(context, showLoading); - var url = EXA_CART_API_BASE_URL + PACKAGES_CUSTOMER + "/username/${patientUser.patientID}"; + var url = EXA_CART_API_BASE_URL + PACKAGES_CUSTOMER + "/username/${patientUser!.patientID}"; await baseAppClient.simpleGet(url, headers: packagesAuthHeader, onSuccess: (dynamic stringResponse, int statusCode) { var jsonResponse = json.decode(stringResponse); var customerJson = jsonResponse['customers'].first; @@ -249,18 +248,18 @@ class OffersAndPackagesServices extends BaseService { }); _hideLoading(context, showLoading); - return customer; + return customer!; } // -------------------- // Shopping Cart // -------------------- - Future> cartItems({@required BuildContext context, bool showLoading = true}) async { + Future?> cartItems({required BuildContext context, bool showLoading = true}) async { Future errorThrow; cartItemList.clear(); _showLoading(context, showLoading); - var url = EXA_CART_API_BASE_URL + PACKAGES_SHOPPING_CART + '/${customer.id}'; + var url = EXA_CART_API_BASE_URL + PACKAGES_SHOPPING_CART + '/${customer!.id}'; Map jsonResponse; await baseAppClient.simpleGet(url, headers: packagesAuthHeader, onSuccess: (dynamic stringResponse, int statusCode) { _hideLoading(context, showLoading); @@ -269,20 +268,20 @@ class OffersAndPackagesServices extends BaseService { jsonResponse['shopping_carts'].forEach((json) { cartItemList.add(PackagesCartItemsResponseModel.fromJson(json)); }); + return jsonResponse; }, onFailure: (String error, int statusCode) { _hideLoading(context, showLoading); log(error); errorThrow = Future.error({"error": error, "statusCode": statusCode}); + return errorThrow; }, queryParams: null); - - return errorThrow ?? jsonResponse; } - Future> addProductToCart(AddProductToCartRequestModel request, {@required BuildContext context, bool showLoading = true}) async { + Future?> addProductToCart(AddProductToCartRequestModel request, {required BuildContext context, bool showLoading = true}) async { Future errorThrow; ResponseModel response; - request.customer_id = customer.id; + request.customer_id = customer!.id; _showLoading(context, showLoading); var url = EXA_CART_API_BASE_URL + PACKAGES_SHOPPING_CART; @@ -293,58 +292,57 @@ class OffersAndPackagesServices extends BaseService { var jsonCartItem = jsonResponse["shopping_carts"][0]; response = ResponseModel(status: true, data: PackagesCartItemsResponseModel.fromJson(jsonCartItem), error: null); cartItemCount = (jsonResponse['count'] ?? 0).toString(); + return response; }, onFailure: (String error, int statusCode) { _hideLoading(context, showLoading); errorThrow = Future.error(ResponseModel(status: true, data: null, error: error)); + return errorThrow; }); - - return errorThrow ?? response; } - Future updateProductToCart(int cartItemID, {UpdateProductToCartRequestModel request, @required BuildContext context, bool showLoading = true}) async { + Future updateProductToCart(int cartItemID, {UpdateProductToCartRequestModel? request, required BuildContext context, bool showLoading = true}) async { Future errorThrow; _showLoading(context, showLoading); var url = EXA_CART_API_BASE_URL + PACKAGES_SHOPPING_CART + '/$cartItemID'; - await baseAppClient.simplePut(url, headers: packagesAuthHeader, body: request.json(), onSuccess: (dynamic stringResponse, int statusCode) { + await baseAppClient.simplePut(url, headers: packagesAuthHeader, body: request!.json(), onSuccess: (dynamic stringResponse, int statusCode) { _hideLoading(context, showLoading); - var jsonResponse = json.decode(stringResponse); + return jsonResponse; }, onFailure: (String error, int statusCode) { _hideLoading(context, showLoading); log(error); errorThrow = Future.error({"error": error, "statusCode": statusCode}); + return errorThrow; }); - - return errorThrow ?? bannersList; } - Future deleteProductFromCart(int cartItemID, {@required BuildContext context, bool showLoading = true}) async { + Future deleteProductFromCart(int cartItemID, {required BuildContext context, bool showLoading = true}) async { Future errorThrow; _showLoading(context, showLoading); var url = EXA_CART_API_BASE_URL + PACKAGES_SHOPPING_CART + '/$cartItemID'; await baseAppClient.simpleDelete(url, headers: packagesAuthHeader, onSuccess: (dynamic stringResponse, int statusCode) { _hideLoading(context, showLoading); + return true; }, onFailure: (String error, int statusCode) { _hideLoading(context, showLoading); log(error); errorThrow = Future.error({"error": error, "statusCode": statusCode}); + return errorThrow; }); - - return errorThrow ?? true; } // -------------------- // Place Order // -------------------- - Future placeOrder({@required Map paymentParams, @required int projectID, @required BuildContext context, bool showLoading = true}) async { + Future placeOrder({required Map paymentParams, required int projectID, required BuildContext context, bool showLoading = true}) async { Future errorThrow; Map jsonBody = { - "customer_id": customer.id, + "customer_id": customer!.id, "project_id": projectID, - "billing_address": {"email": patientUser.emailAddress, "phone_number": patientUser.mobileNumber}, + "billing_address": {"email": patientUser!.emailAddress, "phone_number": patientUser!.mobileNumber}, }; jsonBody.addAll(paymentParams); jsonBody = {'order': jsonBody}; @@ -359,25 +357,25 @@ class OffersAndPackagesServices extends BaseService { var jsonResponse = json.decode(stringResponse); order_id = jsonResponse['orders'][0]['id']; + return order_id; }, onFailure: (String error, int statusCode) { _hideLoading(context, showLoading); log(error); errorThrow = Future.error(error); + return errorThrow; }); - - return errorThrow ?? order_id; } // -------------------- // Order History // -------------------- - Future> orderHistory({@required BuildContext context, bool showLoading = true}) async { + Future?> orderHistory({required BuildContext context, bool showLoading = true}) async { // if(ordersHistory.isNotEmpty) // return ordersHistory; Future errorThrow; // https://mdlaboratories.com/offersdiscounts/api/orders/items/0535256053?fields=id,product,utilize_by_vida,valid_until_date_utc,order_id&page=1&limit=100 - Map queryParams ={}; + Map queryParams = {}; queryParams['fields'] = 'id,product,utilize_by_vida,valid_until_date_utc,order_id'; queryParams['page'] = "1"; queryParams['limit'] = "100"; @@ -392,17 +390,16 @@ class OffersAndPackagesServices extends BaseService { final order_items = jsonResponse["order_items"] as List; ordersHistory = order_items.map((e) => PackagesResponseModel().fromJson(e['product'])).toList(); print(ordersHistory); - + return ordersHistory; }, onFailure: (String error, int statusCode) { _hideLoading(context, showLoading); log(error); errorThrow = Future.error(error); + return errorThrow; }); - - return errorThrow ?? ordersHistory; } - Future> getOrderById(int id, {@required BuildContext context, bool showLoading = true}) async { + Future?> getOrderById(int id, {required BuildContext context, bool showLoading = true}) async { Future errorThrow; ResponseModel response; @@ -414,12 +411,12 @@ class OffersAndPackagesServices extends BaseService { var jsonResponse = json.decode(stringResponse); var jsonOrder = jsonResponse['orders'][0]; response = ResponseModel(status: true, data: PackagesOrderResponseModel.fromJson(jsonOrder)); + return response; }, onFailure: (String error, int statusCode) { _hideLoading(context, showLoading); errorThrow = Future.error(ResponseModel(status: false, error: error)); + return errorThrow; }, queryParams: null); - - return errorThrow ?? response; } Future getHospitals({bool isResBasedOnLoc = true}) async { @@ -429,18 +426,16 @@ class OffersAndPackagesServices extends BaseService { body['IsOnlineCheckIn'] = isResBasedOnLoc; body['PatientOutSA'] = 0; - await baseAppClient.post(GET_PROJECT, - onSuccess: (dynamic response, int statusCode) { - _hospitals.clear(); - response['ListProject'].forEach((hospital) { - _hospitals.add(HospitalsModel.fromJson(hospital)); - }); - }, onFailure: (String error, int statusCode) { - hasError = true; - super.error = error; - }, body: body); + await baseAppClient.post(GET_PROJECT, onSuccess: (dynamic response, int statusCode) { + _hospitals.clear(); + response['ListProject'].forEach((hospital) { + _hospitals.add(HospitalsModel.fromJson(hospital)); + }); + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: body); } - } _showLoading(BuildContext context, bool flag) { diff --git a/lib/core/service/parmacyModule/lacum-registration-service.dart b/lib/core/service/parmacyModule/lacum-registration-service.dart index b3e64e69..8686a9e6 100644 --- a/lib/core/service/parmacyModule/lacum-registration-service.dart +++ b/lib/core/service/parmacyModule/lacum-registration-service.dart @@ -6,7 +6,7 @@ import 'lacum-service.dart'; class LacumRegistrationService extends LacumService{ - ListUserAgreement listUserAgreement; + ListUserAgreement? listUserAgreement; Future getLacumAccountInformationById(String patientIdentificationNo) async { hasError = false; diff --git a/lib/core/service/parmacyModule/lacum-service.dart b/lib/core/service/parmacyModule/lacum-service.dart index d94632c2..980ed030 100644 --- a/lib/core/service/parmacyModule/lacum-service.dart +++ b/lib/core/service/parmacyModule/lacum-service.dart @@ -9,8 +9,8 @@ class LacumService extends BaseService{ String errorMsg = ''; String successMsg = ''; - LacumAccountInformation lacumInformation; - LacumAccountInformation lacumGroupInformation; + LacumAccountInformation? lacumInformation; + LacumAccountInformation? lacumGroupInformation; Future getLacumAccountInformation(String identificationNo) async { hasError = false; @@ -38,7 +38,7 @@ class LacumService extends BaseService{ Map body = Map(); body['IdentificationNo'] = identificationNo; - body['AccountNumber'] = "${lacumInformation.yahalaAccountNo}"; + body['AccountNumber'] = "${lacumInformation!.yahalaAccountNo}"; body['IsDetailsRequired'] = true; try { @@ -57,7 +57,7 @@ class LacumService extends BaseService{ Future makeAccountActivate() async { hasError = false; super.error = ""; - int yahalaAccountNo = lacumInformation.yahalaAccountNo; + int? yahalaAccountNo = lacumInformation?.yahalaAccountNo; Map body = Map(); body['CreatedBy'] = 103; @@ -80,7 +80,7 @@ class LacumService extends BaseService{ Future makeAccountDeactivate() async { hasError = false; super.error = ""; - int yahalaAccountNo = lacumInformation.yahalaAccountNo; + int? yahalaAccountNo = lacumInformation?.yahalaAccountNo; Map body = Map(); body['CreatedBy'] = 103; @@ -121,7 +121,7 @@ class LacumService extends BaseService{ try { await baseAppClient.post(CREATE_LAKUM_ACCOUNT, onSuccess: (response, statusCode) async { - successMsg = LacumAccountInformation.fromJson(response).message; + successMsg = LacumAccountInformation.fromJson(response).message!; }, onFailure: (String error, int statusCode) { hasError = true; super.error = error; diff --git a/lib/core/service/parmacyModule/lacum-transfer-service.dart b/lib/core/service/parmacyModule/lacum-transfer-service.dart index b15696f9..c66f5efe 100644 --- a/lib/core/service/parmacyModule/lacum-transfer-service.dart +++ b/lib/core/service/parmacyModule/lacum-transfer-service.dart @@ -4,7 +4,8 @@ import 'package:diplomaticquarterapp/core/model/pharmacies/LacumAccountInformati import 'lacum-service.dart'; class LacumTransferService extends LacumService{ - LacumAccountInformation lacumReceiverInformation; + + LacumAccountInformation ?lacumReceiverInformation; Future getLacumGroupDataBuAccountId(String accountId) async { hasError = false; @@ -33,14 +34,14 @@ class LacumTransferService extends LacumService{ super.error = ""; Map body = Map(); - body['MobileNo'] = lacumGroupInformation.lakumInquiryInformationObjVersion.mobileNumber; - body['UserName'] = lacumGroupInformation.lakumInquiryInformationObjVersion.memberName; - body['YaHalaSenderAccNumber'] = lacumGroupInformation.lakumInquiryInformationObjVersion.accountNumber; - body['Yahala_IdentificationNo'] = lacumGroupInformation.lakumInquiryInformationObjVersion.memberUniversalId; + body['MobileNo'] = lacumGroupInformation!.lakumInquiryInformationObjVersion!.mobileNumber; + body['UserName'] = lacumGroupInformation!.lakumInquiryInformationObjVersion!.memberName; + body['YaHalaSenderAccNumber'] = lacumGroupInformation!.lakumInquiryInformationObjVersion!.accountNumber; + body['Yahala_IdentificationNo'] = lacumGroupInformation!.lakumInquiryInformationObjVersion!.memberUniversalId; body['YaHalaPointsToTransfer'] = points; - body['YaHalaReceiverAccNumber'] = lacumReceiverInformation.lakumInquiryInformationObjVersion.accountNumber; - body['YaHalaReceiverMobileNumber'] = lacumReceiverInformation.lakumInquiryInformationObjVersion.mobileNumber; - body['YaHalaReceiverName'] = lacumReceiverInformation.lakumInquiryInformationObjVersion.memberName; + body['YaHalaReceiverAccNumber'] = lacumReceiverInformation!.lakumInquiryInformationObjVersion!.accountNumber; + body['YaHalaReceiverMobileNumber'] = lacumReceiverInformation!.lakumInquiryInformationObjVersion!.mobileNumber; + body['YaHalaReceiverName'] = lacumReceiverInformation!.lakumInquiryInformationObjVersion!.memberName; try { await baseAppClient.post(TRANSFER_YAHALA_LOYALITY_POINTS, diff --git a/lib/core/service/parmacyModule/order-preview-service.dart b/lib/core/service/parmacyModule/order-preview-service.dart index 17dfaf99..f205e61b 100644 --- a/lib/core/service/parmacyModule/order-preview-service.dart +++ b/lib/core/service/parmacyModule/order-preview-service.dart @@ -14,10 +14,10 @@ class OrderPreviewService extends BaseService { bool hasError = false; String errorMsg = ''; - List addresses = List(); - LacumAccountInformation lacumInformation; - LacumAccountInformation lacumGroupInformation; - List orderList = List(); + List addresses = []; + LacumAccountInformation? lacumInformation; + LacumAccountInformation? lacumGroupInformation; + List orderList = []; Future getAddresses() async { var customerId = await sharedPref.getString(PHARMACY_CUSTOMER_ID); @@ -61,7 +61,7 @@ class OrderPreviewService extends BaseService { var customerId = await sharedPref.getString(PHARMACY_CUSTOMER_ID); var customerGUID = await sharedPref.getObject(PHARMACY_CUSTOMER_GUID); - if (customerId == null) return null; + if (customerId == null) return Map(); Map queryParams = {'shopping_cart_type': '1'}; dynamic localRes; @@ -162,7 +162,7 @@ class OrderPreviewService extends BaseService { Map body = Map(); body['IdentificationNo'] = identificationNo; - body['AccountNumber'] = "${lacumInformation.yahalaAccountNo}"; + body['AccountNumber'] = "${lacumInformation!.yahalaAccountNo}"; try { await baseAppClient.post(GET_LACUM_GROUP_INFORMATION, onSuccess: (response, statusCode) async { @@ -177,7 +177,7 @@ class OrderPreviewService extends BaseService { } Future makeOrder(PaymentCheckoutData paymentCheckoutData, List shoppingCarts, bool isLakumEnabled) async { - paymentCheckoutData.address.isChecked = true; + paymentCheckoutData.address!.isChecked = true; hasError = false; super.error = ""; @@ -191,22 +191,22 @@ class OrderPreviewService extends BaseService { orderBody['pick_up_in_store'] = false; orderBody['payment_method_system_name'] = "Payments.PayFort"; - if (paymentCheckoutData.shippingOption.shippingRateComputationMethodSystemName == "Shipping.Aramex") + if (paymentCheckoutData.shippingOption!.shippingRateComputationMethodSystemName == "Shipping.Aramex") orderBody['shipping_method'] = "Aramex Domestic"; else orderBody['shipping_method'] = "Fixed Price"; - orderBody['shipping_rate_computation_method_system_name'] = paymentCheckoutData.shippingOption.shippingRateComputationMethodSystemName; + orderBody['shipping_rate_computation_method_system_name'] = paymentCheckoutData.shippingOption!.shippingRateComputationMethodSystemName; orderBody['customer_id'] = int.parse(customerId); - orderBody['custom_values_xml'] = "PaymentOption:${getPaymentOptionName(paymentCheckoutData.paymentOption)}"; + orderBody['custom_values_xml'] = "PaymentOption:${getPaymentOptionName(paymentCheckoutData.paymentOption!)}"; orderBody['shippingOption'] = paymentCheckoutData.shippingOption; orderBody['shipping_address'] = paymentCheckoutData.address; orderBody['lakum_amount'] = isLakumEnabled ? paymentCheckoutData.usedLakumPoints : 0; - List> itemsList = List(); + List> itemsList = []; shoppingCarts.forEach((item) { Map orderItemsBody = Map(); - orderItemsBody['product_id'] = item.product.id; + orderItemsBody['product_id'] = item.product!.id; orderItemsBody['quantity'] = item.quantity; itemsList.add(orderItemsBody); }); @@ -256,7 +256,7 @@ class OrderPreviewService extends BaseService { } } - Future getDriverLocation(dynamic driverId) async { + Future getDriverLocation(dynamic driverId) async { Map jsonBody = Map(); jsonBody['DriverID'] = driverId; @@ -268,10 +268,12 @@ class OrderPreviewService extends BaseService { double lon = locationObject['Longitude']; if (lat != null && lon != null) { coordinates = LatLng(lat, lon); + return coordinates; } } - }, onFailure: (String error, int statusCode) {}, body: jsonBody); - - return coordinates; + }, onFailure: (String error, int statusCode) { + return LatLng(double.nan, double.nan); + //added by Amir + }, body: jsonBody); } } diff --git a/lib/core/service/parmacyModule/parmacy_module_service.dart b/lib/core/service/parmacyModule/parmacy_module_service.dart index 01b59701..863984b0 100644 --- a/lib/core/service/parmacyModule/parmacy_module_service.dart +++ b/lib/core/service/parmacyModule/parmacy_module_service.dart @@ -13,13 +13,13 @@ class PharmacyModuleService extends BaseService { bool isFinished = true; String errorMsg = ''; String url = ""; - CustomerInfo customerInfo; + CustomerInfo? customerInfo; - List bannerItems = List(); - List manufacturerList = List(); - List bestSellerProducts = List(); - List lastVisitedProducts = List(); - List mostViewedProducts = List(); + List bannerItems =[]; + List manufacturerList =[]; + List bestSellerProducts =[]; + List lastVisitedProducts =[]; + List mostViewedProducts =[]; Future makeVerifyCustomer(dynamic data) async { Map queryParams = {'FileNumber': data['PatientID'].toString()}; @@ -56,7 +56,7 @@ class PharmacyModuleService extends BaseService { if (!response['IsRegistered']) { } else { customerInfo = CustomerInfo.fromJson(response); - await sharedPref.setObject(PHARMACY_CUSTOMER_ID, customerInfo.customerId); + await sharedPref.setObject(PHARMACY_CUSTOMER_ID, customerInfo!.customerId); await sharedPref.setObject(PHARMACY_CUSTOMER_GUID, response['customerDto']['customerGuid']); } }, onFailure: (String error, int statusCode) { diff --git a/lib/core/service/parmacyModule/prescription_service.dart b/lib/core/service/parmacyModule/prescription_service.dart index 9a77b7bc..ecad3b77 100644 --- a/lib/core/service/parmacyModule/prescription_service.dart +++ b/lib/core/service/parmacyModule/prescription_service.dart @@ -9,7 +9,7 @@ class PrescriptionService extends BaseService { bool hasError = false; String errorMsg = ''; - List _prescriptionsList = List(); + List _prescriptionsList =[]; List get prescriptionsList => _prescriptionsList; diff --git a/lib/core/service/parmacyModule/terms-condition-service.dart b/lib/core/service/parmacyModule/terms-condition-service.dart index 68fac632..7d03c5dc 100644 --- a/lib/core/service/parmacyModule/terms-condition-service.dart +++ b/lib/core/service/parmacyModule/terms-condition-service.dart @@ -9,7 +9,7 @@ class TermsConditionService extends BaseService{ String errorMsg = ''; String successMsg = ''; - ListUserAgreement listUserAgreement; + ListUserAgreement? listUserAgreement; Future getUserTermsAndConditionsForEPharmcy() async { hasError = false; diff --git a/lib/core/service/pharmacies_service.dart b/lib/core/service/pharmacies_service.dart index 05f45710..88235c0e 100644 --- a/lib/core/service/pharmacies_service.dart +++ b/lib/core/service/pharmacies_service.dart @@ -5,8 +5,8 @@ import 'package:diplomaticquarterapp/core/service/base_service.dart'; import 'package:geolocator/geolocator.dart'; class PharmacyService extends BaseService { - List _medicineItem = List(); - List _pharmaciesList = List(); + List _medicineItem =[]; + List _pharmaciesList =[]; List get medicineItem => _medicineItem; List get pharmaciesList => _pharmaciesList; @@ -65,7 +65,7 @@ class PharmacyService extends BaseService { _getCurrentLocation() async { await Geolocator.getLastKnownPosition().then((value) { - _latitude = value.latitude; + _latitude = value!.latitude; _longitude = value.longitude; }).catchError((e) { _longitude = 0; @@ -73,7 +73,7 @@ class PharmacyService extends BaseService { }); } - Future getMedicineList({String drugName}) async { + Future getMedicineList({required String drugName}) async { hasError = false; await _getCurrentLocation(); Map body = Map(); @@ -97,7 +97,7 @@ class PharmacyService extends BaseService { } - Future getPharmaciesList({int itemID}) async { + Future getPharmaciesList({required int itemID}) async { await _getCurrentLocation(); Map body = Map(); diff --git a/lib/core/service/pharmacy_categorise_service.dart b/lib/core/service/pharmacy_categorise_service.dart index aa3c9e95..736c2788 100644 --- a/lib/core/service/pharmacy_categorise_service.dart +++ b/lib/core/service/pharmacy_categorise_service.dart @@ -11,43 +11,43 @@ import 'base_service.dart'; class PharmacyCategoriseService extends BaseService { //service one - List _categoriseList = List(); + List _categoriseList =[]; List get categoriseList => _categoriseList; //service two - List _parentCategoriseList = List(); + List _parentCategoriseList =[]; List get parentCategoriseList => _parentCategoriseList; //service three - List _parentProductsList = List(); + List _parentProductsList =[]; List get parentProductsList => _parentProductsList; //service four - List _subCategoriseList = List(); + List _subCategoriseList =[]; List get subCategoriseList => _subCategoriseList; //service five - List _subProductsList = List(); + List _subProductsList =[]; List get subProductsList => _subProductsList; //service six - List _finalProducts = List(); + List _finalProducts =[]; List get finalProducts => _finalProducts; //service 7 - List _brandsList = List(); + List _brandsList =[]; List get brandsList => _brandsList; // service 8 - List _searchList = List(); + List _searchList =[]; List get searchList => _searchList; - List _scanList = List(); + List _scanList =[]; List get scanList => _scanList; - List manufacturerProducts = List(); + List manufacturerProducts =[]; clearSearchList() { _searchList.clear(); @@ -70,7 +70,7 @@ class PharmacyCategoriseService extends BaseService { ); } - Future scanQr({String id}) async { + Future scanQr({required String id}) async { hasError = false; _scanList.clear(); String endPoint = id != null ? SCAN_QR_CODE + "$id" : SCAN_QR_CODE + ""; @@ -88,7 +88,7 @@ class PharmacyCategoriseService extends BaseService { ); } - Future searchProducts({String productName}) async { + Future searchProducts({required String productName}) async { hasError = false; _searchList.clear(); // the language ID in pharmacy is different not same in patient app, en == 1 , ar == 2 @@ -111,7 +111,7 @@ class PharmacyCategoriseService extends BaseService { ); } - Future getBrands({String id}) async { + Future getBrands({required String id}) async { hasError = false; _brandsList.clear(); await baseAppClient.getPharmacy( @@ -128,7 +128,7 @@ class PharmacyCategoriseService extends BaseService { ); } - Future getCategoriseParent({String id}) async { + Future getCategoriseParent({required String id}) async { hasError = false; _parentCategoriseList.clear(); String endPoint = @@ -148,7 +148,7 @@ class PharmacyCategoriseService extends BaseService { } Future getParentProducts( - {String id, int pageNumber, bool isLoading = false}) async { + {String? id, int? pageNumber, bool isLoading = false}) async { hasError = false; if (isLoading == false) { _parentProductsList.clear(); @@ -171,7 +171,7 @@ class PharmacyCategoriseService extends BaseService { ); } - Future getSubCategorise({String id}) async { + Future getSubCategorise({required String id}) async { hasError = false; _subCategoriseList.clear(); @@ -192,7 +192,7 @@ class PharmacyCategoriseService extends BaseService { } Future getSubProducts( - {String id, int pageIndex, bool isLoading = false}) async { + {String? id, int? pageIndex, bool isLoading = false}) async { hasError = false; if (isLoading == false) { _subProductsList.clear(); @@ -214,7 +214,7 @@ class PharmacyCategoriseService extends BaseService { ); } - Future getFinalProducts({String id}) async { + Future getFinalProducts({required String id}) async { hasError = false; _finalProducts.clear(); String endPoint = @@ -300,7 +300,7 @@ class PharmacyCategoriseService extends BaseService { } Future getFilteredProducts( - {String categoryId, String brandId, String min, String max}) async { + {String? categoryId, String? brandId, String? min, String? max}) async { hasError = false; String endPoint; @@ -325,7 +325,7 @@ class PharmacyCategoriseService extends BaseService { } Future getFilteredSubProducts( - {String categoryId, String brandId, String min, String max}) async { + {String? categoryId, String? brandId, String? min, String? max}) async { hasError = false; String endPoint; diff --git a/lib/core/service/privilege_service.dart b/lib/core/service/privilege_service.dart index e9b2d8a9..433fc1b4 100644 --- a/lib/core/service/privilege_service.dart +++ b/lib/core/service/privilege_service.dart @@ -4,8 +4,8 @@ import 'package:diplomaticquarterapp/core/model/privilege/VidaPlusProjectListMod import 'package:diplomaticquarterapp/core/service/base_service.dart'; class PrivilegeService extends BaseService { - List privilegeModelList = List(); - List vidaPlusProjectListModel = List(); + List privilegeModelList =[]; + List vidaPlusProjectListModel =[]; Future getPrivilege() async { Map body = Map(); diff --git a/lib/core/service/qr_service.dart b/lib/core/service/qr_service.dart index d43ed5bb..5d87a7aa 100644 --- a/lib/core/service/qr_service.dart +++ b/lib/core/service/qr_service.dart @@ -3,7 +3,7 @@ import 'package:diplomaticquarterapp/core/model/qr/qr_parking_model.dart'; import 'package:diplomaticquarterapp/core/service/base_service.dart'; class QrService extends BaseService { - List qRParkingList = List(); + List qRParkingList =[]; Future getQRParkingByID(int qRParkingID) async { Map body = Map(); diff --git a/lib/core/service/vaccine_service.dart b/lib/core/service/vaccine_service.dart index 238ae3e5..45046428 100644 --- a/lib/core/service/vaccine_service.dart +++ b/lib/core/service/vaccine_service.dart @@ -5,9 +5,9 @@ import 'package:diplomaticquarterapp/core/model/vaccine/vaccination_on_hand.dart import 'package:diplomaticquarterapp/core/service/base_service.dart'; class VaccineService extends BaseService { - List _vaccineList = List(); - List vaccinationItemList = List(); - List vaccinationOnHandList = List(); + List _vaccineList =[]; + List vaccinationItemList =[]; + List vaccinationOnHandList =[]; List get vaccineList => _vaccineList; @@ -60,7 +60,7 @@ class VaccineService extends BaseService { }, body: Map()); } - Future getMyVaccinationOnHand({String pItemCode}) async { + Future getMyVaccinationOnHand({required String pItemCode}) async { Map body = Map(); body['P_ITEM_CODE'] = pItemCode; await baseAppClient.post(GET_VACCINATION_ONHAND, diff --git a/lib/core/service/weather_service.dart b/lib/core/service/weather_service.dart index 107f1010..a94dd9e1 100644 --- a/lib/core/service/weather_service.dart +++ b/lib/core/service/weather_service.dart @@ -4,7 +4,7 @@ import 'package:diplomaticquarterapp/core/model/weahter/weather_model.dart'; import 'package:diplomaticquarterapp/core/service/base_service.dart'; class WeatherService extends BaseService { - List weatherIndicatorData = List(); + List weatherIndicatorData =[]; Map body = Map(); String Latitude = ""; diff --git a/lib/core/viewModels/AlHabibMedicalService/H2O_view_model.dart b/lib/core/viewModels/AlHabibMedicalService/H2O_view_model.dart index 3e980071..aa424b46 100644 --- a/lib/core/viewModels/AlHabibMedicalService/H2O_view_model.dart +++ b/lib/core/viewModels/AlHabibMedicalService/H2O_view_model.dart @@ -1,6 +1,6 @@ import 'dart:math' as math; -import 'package:charts_flutter/flutter.dart' as charts; +import 'package:flutter_charts/flutter_charts.dart' as charts; import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/H2O/insert_user_activity_request_model.dart'; import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/H2O/user_detail_model.dart'; @@ -18,8 +18,8 @@ class H2OViewModel extends BaseViewModel { // // List userProgressForWeekDataSeries; - List userProgressForWeekDataSeries; - List userProgressForMonthDataSeries; + List? userProgressForWeekDataSeries; + List? userProgressForMonthDataSeries; // List userProgressForMonthDataSeries; @@ -27,7 +27,7 @@ class H2OViewModel extends BaseViewModel { UserProgressForTodayDataModel get userProgressData { if (_h2OService.userProgressForTodayDataList.length != 0) return _h2OService.userProgressForTodayDataList[0]; - return null; + return UserProgressForTodayDataModel(); } Future getUserDetail() async { @@ -35,7 +35,7 @@ class H2OViewModel extends BaseViewModel { setState(ViewState.Busy); await _h2OService.getUserDetail(); if (_h2OService.hasError) { - error = _h2OService.error; + error = _h2OService.error!; setState(ViewState.Error); } else { setState(ViewState.Idle); @@ -47,7 +47,7 @@ class H2OViewModel extends BaseViewModel { await _h2OService.updateUserDetail(userDetailModel); if (_h2OService.hasError) { - error = _h2OService.error; + error = _h2OService.error!; setState(ViewState.Error); onResponse(false); } else { @@ -62,7 +62,7 @@ class H2OViewModel extends BaseViewModel { setState(ViewState.Busy); await _h2OService.getUserProgressForTodayData(); if (_h2OService.hasError) { - error = _h2OService.error; + error = _h2OService.error!; setState(ViewState.Error); } else { setState(ViewState.Idle); @@ -73,7 +73,7 @@ class H2OViewModel extends BaseViewModel { setState(ViewState.Busy); await _h2OService.getUserProgressForWeekData(); if (_h2OService.hasError) { - error = _h2OService.error; + error = _h2OService.error!; setState(ViewState.Error); } else { // userProgressForWeekDataSeries = createUserProgressForWeekDataSeries(); @@ -86,7 +86,7 @@ class H2OViewModel extends BaseViewModel { setState(ViewState.Busy); await _h2OService.getUserProgressForMonthData(); if (_h2OService.hasError) { - error = _h2OService.error; + error = _h2OService.error!; setState(ViewState.Error); } else { userProgressForMonthDataSeries = createUserProgressForMonthDataSeriesNew(); @@ -97,7 +97,7 @@ class H2OViewModel extends BaseViewModel { List> createUserProgressForWeekDataSeries() { List globalData = []; _h2OService.userProgressForWeekDataList.forEach((UserProgressForWeekDataModel data) { - globalData.add(new ChartSeries(data.dayName, data.percentageConsumed)); + globalData.add(new ChartSeries(data.dayName!, data.percentageConsumed!)); }); Iterable minMaxList = globalData.map((e) => e.x).toList(); int maxValue = minMaxList.isEmpty ? 0 : minMaxList.reduce(math.max); @@ -123,7 +123,7 @@ class H2OViewModel extends BaseViewModel { List list = []; _h2OService.userProgressForWeekDataList.forEach((UserProgressForWeekDataModel data) { - list.add(new LineChartModel(data.dayName, data.percentageConsumed)); + list.add(new LineChartModel(data.dayName!, data.percentageConsumed!)); }); return list; } @@ -131,7 +131,7 @@ class H2OViewModel extends BaseViewModel { List createUserProgressForMonthDataSeriesNew() { List list = []; _h2OService.userProgressForMonthDataList.forEach((UserProgressForMonthDataModel data) { - list.add(new LineChartModel(data.monthName, data.percentageConsumed)); + list.add(new LineChartModel(data.monthName!, data.percentageConsumed!)); }); return list; } @@ -139,7 +139,7 @@ class H2OViewModel extends BaseViewModel { List> createUserProgressForMonthDataSeries() { List globalData = []; _h2OService.userProgressForMonthDataList.forEach((UserProgressForMonthDataModel data) { - globalData.add(new ChartSeries(data.monthName, data.percentageConsumed)); + globalData.add(new ChartSeries(data.monthName!, data.percentageConsumed!)); }); return [ new charts.Series( @@ -158,7 +158,7 @@ class H2OViewModel extends BaseViewModel { await _h2OService.insertUserActivity(insertUserActivityRequestModel); if (_h2OService.hasError) { - error = _h2OService.error; + error = _h2OService.error!; setState(ViewState.ErrorLocal); } else { setState(ViewState.Idle); @@ -169,7 +169,7 @@ class H2OViewModel extends BaseViewModel { setState(ViewState.BusyLocal); await _h2OService.undoUserActivity(); if (_h2OService.hasError) { - error = _h2OService.error; + error = _h2OService.error!; setState(ViewState.ErrorLocal); } else { setState(ViewState.Idle); diff --git a/lib/core/viewModels/AlHabibMedicalService/add_new_address_Request_Model.dart b/lib/core/viewModels/AlHabibMedicalService/add_new_address_Request_Model.dart index 0aeb9f60..25273968 100644 --- a/lib/core/viewModels/AlHabibMedicalService/add_new_address_Request_Model.dart +++ b/lib/core/viewModels/AlHabibMedicalService/add_new_address_Request_Model.dart @@ -1,5 +1,5 @@ class AddNewAddressRequestModel { - Customer customer; + Customer? customer; AddNewAddressRequestModel({this.customer}); @@ -12,25 +12,25 @@ class AddNewAddressRequestModel { Map toJson() { final Map data = new Map(); if (this.customer != null) { - data['customer'] = this.customer.toJson(); + data['customer'] = this.customer!.toJson(); } return data; } } class Customer { - List addresses; - String id; - String email; - List roleIds; + List? addresses; + String? id; + String? email; + List? roleIds; Customer({this.addresses, this.id, this.email, this.roleIds}); Customer.fromJson(Map json) { if (json['addresses'] != null) { - addresses = new List(); + addresses = []; json['addresses'].forEach((v) { - addresses.add(new Addresses.fromJson(v)); + addresses!.add(new Addresses.fromJson(v)); }); } id = json['id']; @@ -41,7 +41,7 @@ class Customer { Map toJson() { final Map data = new Map(); if (this.addresses != null) { - data['addresses'] = this.addresses.map((v) => v.toJson()).toList(); + data['addresses'] = this.addresses!.map((v) => v.toJson()).toList(); } data['id'] = this.id; data['email'] = this.email; @@ -51,24 +51,24 @@ class Customer { } class Addresses { - String id; - String firstName; - String lastName; - String email; + String? id; + String? firstName; + String? lastName; + String? email; dynamic company; - int countryId; - String country; + int? countryId; + String? country; Null stateProvinceId; - String city; - String address1; - String address2; - String zipPostalCode; - String phoneNumber; + String? city; + String? address1; + String? address2; + String? zipPostalCode; + String? phoneNumber; dynamic faxNumber; - String customerAttributes; - String createdOnUtc; + String? customerAttributes; + String? createdOnUtc; dynamic province; - String latLong; + String? latLong; Addresses( {this.id, diff --git a/lib/core/viewModels/AlHabibMedicalService/cmc_view_model.dart b/lib/core/viewModels/AlHabibMedicalService/cmc_view_model.dart index 10edbeb8..9ed243fc 100644 --- a/lib/core/viewModels/AlHabibMedicalService/cmc_view_model.dart +++ b/lib/core/viewModels/AlHabibMedicalService/cmc_view_model.dart @@ -33,25 +33,25 @@ class CMCViewModel extends BaseViewModel { PharmacyModuleService _pharmacyModuleService = locator(); - GetCMCAllOrdersResponseModel pendingOrder; + GetCMCAllOrdersResponseModel? pendingOrder; - bool get isOrderUpdated => _cMCService.isOrderUpdated; + bool? get isOrderUpdated => _cMCService.isOrderUpdated; Future getCMCAllServices() async { await _cMCService.getCMCAllServices(); if (_cMCService.hasError) { - error = _cMCService.error; + error = _cMCService.error!; setState(ViewState.Error); } else { setState(ViewState.Idle); } } - Future getCheckupItems({CMCGetItemsRequestModel cMCGetItemsRequestModel, bool isFirst = false}) async { + Future getCheckupItems({CMCGetItemsRequestModel? cMCGetItemsRequestModel, bool isFirst = false}) async { if (!isFirst) setState(ViewState.Busy); - await _cMCService.getCheckupItems(cMCGetItemsRequestModel); + await _cMCService.getCheckupItems(cMCGetItemsRequestModel!); if (_cMCService.hasError) { - error = _cMCService.error; + error = _cMCService.error!; setState(ViewState.Error); } if (!isFirst) setState(ViewState.Idle); @@ -62,10 +62,10 @@ class CMCViewModel extends BaseViewModel { // await _cMCService.getCmcAllPresOrders(); await _cMCService.getCmcAllPresOrdersRC(); if (_cMCService.hasError) { - error = _cMCService.error; + error = _cMCService.error!; setState(ViewState.Error); } else { - pendingOrder = _cMCService.cmcAllPresOrdersList.firstWhere((element) => element.statusId == 1 || element.statusId == 2, orElse: () => null); + pendingOrder = _cMCService.cmcAllPresOrdersList.firstWhere((element) => element.statusId == 1 || element.statusId == 2, orElse: () => GetCMCAllOrdersResponseModel()); if (pendingOrder != null) { // await getOrderDetailByOrderID(pendingOrder); setState(ViewState.Idle); @@ -80,7 +80,7 @@ class CMCViewModel extends BaseViewModel { // await _cMCService.updateCmcPresOrder(updatePresOrderRequestModel); await _cMCService.updateCmcPresOrderRC(updatePresOrderRequestModel); if (_cMCService.hasError) { - error = _cMCService.error; + error = _cMCService.error!; setState(ViewState.ErrorLocal); } else { setState(ViewState.Idle); @@ -92,13 +92,13 @@ class CMCViewModel extends BaseViewModel { await _cMCService.getOrderDetailByOrderID(getOrderDetailByOrderIDRequestModel); } - Future insertPresPresOrder({CMCInsertPresOrderRequestModel order}) async { + Future insertPresPresOrder({required CMCInsertPresOrderRequestModel order}) async { setState(ViewState.Busy); order.createdBy = user.patientID; order.orderServiceID = OrderService.Comprehensive_Medical_Checkup.getIdOrderService(); String requestId = await _cMCService.insertPresPresOrder(order: order); if (_cMCService.hasError) { - error = _cMCService.error; + error = _cMCService.error!; setState(ViewState.ErrorLocal); } else { getCmcAllPresOrders(); @@ -106,13 +106,13 @@ class CMCViewModel extends BaseViewModel { return requestId; } - Future insertCMCOrderRC({CMCInsertPresOrderRequestModel order}) async { + Future insertCMCOrderRC({required CMCInsertPresOrderRequestModel order}) async { setState(ViewState.Busy); order.createdBy = user.patientID; order.orderServiceID = OrderService.Comprehensive_Medical_Checkup.getIdOrderService(); String requestId = await _cMCService.insertCMCOrderRC(order: order); if (_cMCService.hasError) { - error = _cMCService.error; + error = _cMCService.error!; setState(ViewState.ErrorLocal); } else { getCmcAllPresOrders(); @@ -124,7 +124,7 @@ class CMCViewModel extends BaseViewModel { setState(ViewState.Busy); await _customerAddressesService.getCustomerAddresses(); if (_customerAddressesService.hasError) { - error = _customerAddressesService.error; + error = _customerAddressesService.error!; setState(ViewState.ErrorLocal); } else { setState(ViewState.Idle); @@ -136,7 +136,7 @@ class CMCViewModel extends BaseViewModel { await _pharmacyModuleService.generatePharmacyToken(); if (_customerAddressesService.hasError) { - error = _customerAddressesService.error; + error = _customerAddressesService.error!; await _pharmacyModuleService.createUser(); setState(ViewState.ErrorLocal); } else { @@ -145,11 +145,11 @@ class CMCViewModel extends BaseViewModel { } } - Future addAddressInfo({AddNewAddressRequestModel addNewAddressRequestModel}) async { + Future addAddressInfo({required AddNewAddressRequestModel addNewAddressRequestModel}) async { setState(ViewState.Busy); await _customerAddressesService.addAddressInfo(addNewAddressRequestModel: addNewAddressRequestModel); if (_customerAddressesService.hasError) { - error = _customerAddressesService.error; + error = _customerAddressesService.error!; setState(ViewState.ErrorLocal); } else { setState(ViewState.Idle); diff --git a/lib/core/viewModels/AlHabibMedicalService/health-calculator/Bariatrics-viewmodel.dart b/lib/core/viewModels/AlHabibMedicalService/health-calculator/Bariatrics-viewmodel.dart index ce46a9c6..f545caff 100644 --- a/lib/core/viewModels/AlHabibMedicalService/health-calculator/Bariatrics-viewmodel.dart +++ b/lib/core/viewModels/AlHabibMedicalService/health-calculator/Bariatrics-viewmodel.dart @@ -17,13 +17,13 @@ class BariatricsViewModel extends BaseViewModel { List get diseasesList => _service.diseasesList; List get doctorList => _service.doctorList; List get doctorListByTime => _service.doctorListByTime; - List doctorLists = List(); + List doctorLists =[]; void getClinicCategory() async { setState(ViewState.Busy); await _service.getClinicCategory(); if (_service.hasError) { - error = _service.error; + error = _service.error!; setState(ViewState.Error); } else { getDiseaseByClinicId(); @@ -34,7 +34,7 @@ class BariatricsViewModel extends BaseViewModel { setState(ViewState.Busy); await _service.getDiseaseByClinicId(); if (_service.hasError) { - error = _service.error; + error = _service.error!; setState(ViewState.Error); } else { setState(ViewState.Idle); @@ -45,18 +45,18 @@ class BariatricsViewModel extends BaseViewModel { setState(ViewState.Busy); await _service.searchDoctorsByTime(disease); if (_service.hasError) { - error = _service.error; + error = _service.error!; setState(ViewState.ErrorLocal); } else { setState(ViewState.Idle); } } - void getDoctorList({@required DiseasesByClinic disease}) async { + void getDoctorList({required DiseasesByClinic disease}) async { setState(ViewState.Busy); await _service.getDoctorList(disease:disease); if (_service.hasError) { - error = _service.error; + error = _service.error!; setState(ViewState.Error); } else { { 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 b8151788..0b7caa28 100644 --- a/lib/core/viewModels/AlHabibMedicalService/home_health_care_view_model.dart +++ b/lib/core/viewModels/AlHabibMedicalService/home_health_care_view_model.dart @@ -32,12 +32,12 @@ class HomeHealthCareViewModel extends BaseViewModel { PharmacyModuleService _pharmacyModuleService = locator(); - bool get isOrderUpdated => _homeHealthCareService.isOrderUpdated; + bool? get isOrderUpdated => _homeHealthCareService.isOrderUpdated; - int get orderId => _homeHealthCareService.requestNo; - GetCMCAllOrdersResponseModel pendingOrder; + int? get orderId => _homeHealthCareService.requestNo; + GetCMCAllOrdersResponseModel? pendingOrder; - List patientERHHCInsertServicesList = List(); + List patientERHHCInsertServicesList =[]; dynamic get hhcResponse => _homeHealthCareService.hhcResponse; @@ -46,7 +46,7 @@ class HomeHealthCareViewModel extends BaseViewModel { // await _homeHealthCareService.getHHCAllServices(hHCGetAllServicesRequestModel); await _homeHealthCareService.getHHCAllServicesRC(hHCGetAllServicesRequestModel); if (_homeHealthCareService.hasError) { - error = _homeHealthCareService.error; + error = _homeHealthCareService.error!; setState(ViewState.Error); } else { setState(ViewState.Idle); @@ -58,10 +58,10 @@ class HomeHealthCareViewModel extends BaseViewModel { setState(ViewState.Busy); await _homeHealthCareService.getHHCAllPresOrdersRC(); if (_homeHealthCareService.hasError) { - error = _homeHealthCareService.error; + error = _homeHealthCareService.error!; setState(ViewState.Error); } else { - pendingOrder = _homeHealthCareService.hhcAllPresOrdersList.firstWhere((element) => element.statusId == 1 || element.statusId == 2, orElse: () => null); + pendingOrder = _homeHealthCareService.hhcAllPresOrdersList.firstWhere((element) => element.statusId == 1 || element.statusId == 2, orElse: () => GetCMCAllOrdersResponseModel()); if (pendingOrder != null) { // await _homeHealthCareService.getOrderDetailByOrderID(pendingOrder.iD); setState(ViewState.Idle); @@ -76,21 +76,21 @@ class HomeHealthCareViewModel extends BaseViewModel { // await _homeHealthCareService.updateHHCPresOrder(updatePresOrderRequestModel); await _homeHealthCareService.updateHHCPresOrderRC(updatePresOrderRequestModel); if (_homeHealthCareService.hasError) { - error = _homeHealthCareService.error; + error = _homeHealthCareService.error!; setState(ViewState.ErrorLocal); } else { setState(ViewState.Idle); } } - Future insertPresPresOrder({PatientERInsertPresOrderRequestModel order}) async { + Future insertPresPresOrder({required PatientERInsertPresOrderRequestModel order}) async { setState(ViewState.Busy); order.createdBy = user.patientID; order.orderServiceID = OrderService.HOME_HEALTH_CARE.getIdOrderService(); // await _homeHealthCareService.insertPresPresOrder(order: order); await _homeHealthCareService.insertHHCOrderRC(order: order); if (_homeHealthCareService.hasError) { - error = _homeHealthCareService.error; + error = _homeHealthCareService.error!; setState(ViewState.ErrorLocal); } else { getHHCAllPresOrders(); @@ -101,7 +101,7 @@ class HomeHealthCareViewModel extends BaseViewModel { setState(ViewState.Busy); await _customerAddressesService.getCustomerAddresses(); if (_customerAddressesService.hasError) { - error = _customerAddressesService.error; + error = _customerAddressesService.error!; setState(ViewState.ErrorLocal); } else { setState(ViewState.Idle); @@ -113,7 +113,7 @@ class HomeHealthCareViewModel extends BaseViewModel { await _pharmacyModuleService.generatePharmacyToken(); if (_customerAddressesService.hasError) { - error = _customerAddressesService.error; + error = _customerAddressesService.error!; await _pharmacyModuleService.createUser(); setState(ViewState.ErrorLocal); } else { @@ -125,7 +125,7 @@ class HomeHealthCareViewModel extends BaseViewModel { return Future.value(1); } - Future addAddressInfo({AddNewAddressRequestModel addNewAddressRequestModel}) async { + Future addAddressInfo({required AddNewAddressRequestModel addNewAddressRequestModel}) async { setState(ViewState.Busy); // await _pharmacyModuleService.generatePharmacyToken().then((value) async { @@ -133,7 +133,7 @@ class HomeHealthCareViewModel extends BaseViewModel { // }); if (_customerAddressesService.hasError) { - error = _customerAddressesService.error; + error = _customerAddressesService.error!; setState(ViewState.ErrorLocal); } else { setState(ViewState.Idle); diff --git a/lib/core/viewModels/all_habib_medical_services/e_referral_view_model.dart b/lib/core/viewModels/all_habib_medical_services/e_referral_view_model.dart index ee803b5e..348c4ea5 100644 --- a/lib/core/viewModels/all_habib_medical_services/e_referral_view_model.dart +++ b/lib/core/viewModels/all_habib_medical_services/e_referral_view_model.dart @@ -27,7 +27,7 @@ class EReferralViewModel extends BaseViewModel { setState(ViewState.Busy); await _eReferralService.getRelationTypes(); if (_eReferralService.hasError) { - error = _eReferralService.error; + error = _eReferralService.error!; setState(ViewState.Error); } else{ setState(ViewState.Idle); @@ -37,7 +37,7 @@ class EReferralViewModel extends BaseViewModel { setState(ViewState.Busy); await _eReferralService.getAllCities(); if (_eReferralService.hasError) { - error = _eReferralService.error; + error = _eReferralService.error!; setState(ViewState.Error); } else{ setState(ViewState.Idle); @@ -52,7 +52,7 @@ class EReferralViewModel extends BaseViewModel { setState(ViewState.BusyLocal); await _eReferralService.sendActivationCodeForEReferral(sendActivationCodeForEReferralRequestModel); if (_eReferralService.hasError) { - error = _eReferralService.error; + error = _eReferralService.error!; setState(ViewState.ErrorLocal); } else{ setState(ViewState.Idle); @@ -63,7 +63,7 @@ class EReferralViewModel extends BaseViewModel { setState(ViewState.BusyLocal); await _eReferralService.checkActivationCodeForEReferral(checkActivationCodeForEReferralRequestModel); if (_eReferralService.hasError) { - error = _eReferralService.error; + error = _eReferralService.error!; setState(ViewState.ErrorLocal); } else{ setState(ViewState.Idle); @@ -75,7 +75,7 @@ class EReferralViewModel extends BaseViewModel { setState(ViewState.BusyLocal); await _eReferralService.createEReferral(createEReferralRequestModel); if (_eReferralService.hasError) { - error = _eReferralService.error; + error = _eReferralService.error!; setState(ViewState.ErrorLocal); } else { setState(ViewState.Idle); @@ -86,7 +86,7 @@ class EReferralViewModel extends BaseViewModel { setState(ViewState.BusyLocal); await _eReferralService.getEReferrals(searchEReferralRequestModel); if (_eReferralService.hasError) { - error = _eReferralService.error; + error = _eReferralService.error!; setState(ViewState.ErrorLocal); } else { setState(ViewState.Idle); diff --git a/lib/core/viewModels/blooddonation/blood_details_view_model.dart b/lib/core/viewModels/blooddonation/blood_details_view_model.dart index b534a022..028be89a 100644 --- a/lib/core/viewModels/blooddonation/blood_details_view_model.dart +++ b/lib/core/viewModels/blooddonation/blood_details_view_model.dart @@ -17,7 +17,7 @@ class BloodDeatailsViewModel extends BaseViewModel{ await _bloodDetailsService .getAllBloodOrders();; if (_bloodDetailsService.hasError) { - error = _bloodDetailsService.error; + error = _bloodDetailsService.error!; setState(ViewState.Error); } else setState(ViewState.Idle); diff --git a/lib/core/viewModels/blooddonation/booddonation_view_model.dart b/lib/core/viewModels/blooddonation/booddonation_view_model.dart index b9c13c57..9c765d3e 100644 --- a/lib/core/viewModels/blooddonation/booddonation_view_model.dart +++ b/lib/core/viewModels/blooddonation/booddonation_view_model.dart @@ -16,7 +16,7 @@ class BloodDonationViewModel extends BaseViewModel{ await _bloodDonationService.getAllCitiesOrders(); // getHospitals(); if (_bloodDonationService.hasError) { - error = _bloodDonationService.error; + error = _bloodDonationService.error!; setState(ViewState.Error); } else setState(ViewState.Idle); diff --git a/lib/core/viewModels/child_vaccines/add_new_child_view_model.dart b/lib/core/viewModels/child_vaccines/add_new_child_view_model.dart index 5af9a75a..c8068a5d 100644 --- a/lib/core/viewModels/child_vaccines/add_new_child_view_model.dart +++ b/lib/core/viewModels/child_vaccines/add_new_child_view_model.dart @@ -14,18 +14,18 @@ class AddNewChildViewModel extends BaseViewModel { // DeleteBabyService _deleteBabyService = locator(); bool isAdded = false; ///create new baby - createNewBabyOrders({ CreateNewBaby newChild}) async { + createNewBabyOrders({ required CreateNewBaby newChild}) async { setState(ViewState.Busy); await _creteNewBabyService.getCreateNewBabyOrders(newChild: newChild, userID: _childVaccinesService.userID); if (_creteNewBabyService.hasError) { - error = _creteNewBabyService.error; + error = _creteNewBabyService.error!; setState(ViewState.Error); } else { isAdded = true; setState(ViewState.Idle); await _childVaccinesService.getAllBabyInformationOrders(); if (_childVaccinesService.hasError) { - error = _childVaccinesService.error; + error = _childVaccinesService.error!; setState(ViewState.Error); } else{ diff --git a/lib/core/viewModels/child_vaccines/child_vaccines_view_model.dart b/lib/core/viewModels/child_vaccines/child_vaccines_view_model.dart index a282b774..6c9aad1b 100644 --- a/lib/core/viewModels/child_vaccines/child_vaccines_view_model.dart +++ b/lib/core/viewModels/child_vaccines/child_vaccines_view_model.dart @@ -28,7 +28,7 @@ class ChildVaccinesViewModel extends BaseViewModel{ setState(ViewState.Busy); await _childVaccinesService.getNewUserOrders(); if (_childVaccinesService.hasError) { - error = _childVaccinesService.error; + error = _childVaccinesService.error!; setState(ViewState.Error); } else getBabyInformatioRequestOrders(); @@ -37,7 +37,7 @@ class ChildVaccinesViewModel extends BaseViewModel{ getBabyInformatioRequestOrders() async { await _childVaccinesService.getAllBabyInformationOrders(); if (_childVaccinesService.hasError) { - error = _childVaccinesService.error; + error = _childVaccinesService.error!; setState(ViewState.Error); } else setState(ViewState.Idle); @@ -46,21 +46,21 @@ class ChildVaccinesViewModel extends BaseViewModel{ ///delete baby - deleteBabyOrders({ DeleteBaby newChild}) async { + deleteBabyOrders({ required DeleteBaby newChild}) async { setState(ViewState.Busy); //await _creteNewBabyService.getCreateNewBabyOrders(newChild: newChild, userID: _childVaccinesService.userID); await _deleteBabyService.getDeleteBabyOrder(deleteChild: newChild,babyID: newChild.babyID); //getDeleteBabyOrder(deleteChild: newChild,); // getDeleteBabyOrder if (_creteNewBabyService.hasError) { - error = _creteNewBabyService.error; + error = _creteNewBabyService.error!; setState(ViewState.Error); } else { isDeleted = true; setState(ViewState.Idle); await _childVaccinesService.getAllBabyInformationOrders(); if (_childVaccinesService.hasError) { - error = _childVaccinesService.error; + error = _childVaccinesService.error!; setState(ViewState.Error); } else{ diff --git a/lib/core/viewModels/child_vaccines/user_information_view_model.dart b/lib/core/viewModels/child_vaccines/user_information_view_model.dart index 68da113c..43bbde60 100644 --- a/lib/core/viewModels/child_vaccines/user_information_view_model.dart +++ b/lib/core/viewModels/child_vaccines/user_information_view_model.dart @@ -16,7 +16,7 @@ class UserInformationViewModel extends BaseViewModel { setState(ViewState.Busy); await _userInformationService.getUserInformationOrders(); if (_userInformationService.hasError) { - error = _userInformationService.error; + error = _userInformationService.error!; setState(ViewState.Error); } else setState(ViewState.Idle); diff --git a/lib/core/viewModels/child_vaccines/vaccination_table_view_model.dart b/lib/core/viewModels/child_vaccines/vaccination_table_view_model.dart index e8b4e287..f1af0baf 100644 --- a/lib/core/viewModels/child_vaccines/vaccination_table_view_model.dart +++ b/lib/core/viewModels/child_vaccines/vaccination_table_view_model.dart @@ -18,7 +18,7 @@ class VaccinationTableViewModel extends BaseViewModel{ await _creteVaccinationTableService.getCreateVaccinationTableOrders(babyInfo, sendEmail);//getCreateNewBabyOrders(); if ( _creteVaccinationTableService.hasError) { - error = _creteVaccinationTableService.error; + error = _creteVaccinationTableService.error!; setState(ViewState.Error); } else setState(ViewState.Idle); diff --git a/lib/core/viewModels/contactus/findus_view_model.dart b/lib/core/viewModels/contactus/findus_view_model.dart index 9b2516ba..f6e1754f 100644 --- a/lib/core/viewModels/contactus/findus_view_model.dart +++ b/lib/core/viewModels/contactus/findus_view_model.dart @@ -23,7 +23,7 @@ class FindusViewModel extends BaseViewModel { await _findusService.getAllFindUsOrders(); if (_findusService.hasError) { - error = _findusService.error; + error = _findusService.error!; setState(ViewState.Error); } else setState(ViewState.Idle); diff --git a/lib/core/viewModels/contactus/livechat_view_model.dart b/lib/core/viewModels/contactus/livechat_view_model.dart index bd130789..76b70ab5 100644 --- a/lib/core/viewModels/contactus/livechat_view_model.dart +++ b/lib/core/viewModels/contactus/livechat_view_model.dart @@ -23,7 +23,7 @@ class LiveChatViewModel extends BaseViewModel{ await _liveChatService.getAllLiveChatOrders(); if (_liveChatService.hasError) { - error = _liveChatService.error; + error = _liveChatService.error!; setState(ViewState.Error); } else setState(ViewState.Idle); diff --git a/lib/core/viewModels/er/EdOnlineViewModel.dart b/lib/core/viewModels/er/EdOnlineViewModel.dart index 1970a965..12847757 100644 --- a/lib/core/viewModels/er/EdOnlineViewModel.dart +++ b/lib/core/viewModels/er/EdOnlineViewModel.dart @@ -15,32 +15,31 @@ class EdOnlineViewModel extends BaseViewModel { List get hospitals => _hospitalService.hospitals; - List get triageQuestionsModelList => - _edOnlineServices.triageQuestionsModelList; + List get triageQuestionsModelList => _edOnlineServices.triageQuestionsModelList; - ErPatientShareModel get erPatientShareModel => _edOnlineServices.erPatientShareModel; + ErPatientShareModel get erPatientShareModel => _edOnlineServices.erPatientShareModel!; Future getHospitals() async { - if(_hospitalService.hospitals.isEmpty){ - setState(ViewState.Busy); - await _hospitalService.getHospitals(); - if (_hospitalService.hasError) { - error = _hospitalService.error; - setState(ViewState.Error); - } else - setState(ViewState.Idle); + if (_hospitalService.hospitals.isEmpty) { + setState(ViewState.Busy); + await _hospitalService.getHospitals(); + if (_hospitalService.hasError) { + error = _hospitalService.error!; + setState(ViewState.Error); + } else + setState(ViewState.Idle); } } Future getQuestions() async { - if(_edOnlineServices.triageQuestionsModelList.isEmpty){ - setState(ViewState.Busy); - await _edOnlineServices.getQuestions(); - if (_edOnlineServices.hasError) { - error = _edOnlineServices.error; - setState(ViewState.Error); - } else - setState(ViewState.Idle); + if (_edOnlineServices.triageQuestionsModelList.isEmpty) { + setState(ViewState.Busy); + await _edOnlineServices.getQuestions(); + if (_edOnlineServices.hasError) { + error = _edOnlineServices.error!; + setState(ViewState.Error); + } else + setState(ViewState.Idle); } } @@ -48,27 +47,17 @@ class EdOnlineViewModel extends BaseViewModel { setState(ViewState.Busy); await _edOnlineServices.getPatientPaymentInformation(); if (_edOnlineServices.hasError) { - error = _edOnlineServices.error; + error = _edOnlineServices.error!; setState(ViewState.Error); } else setState(ViewState.Idle); } - Future saveQuestionsInformation( - {String notes, - String chiefComplaint, - int projectId, - DateTime selectedTime, - List selectedQuestions}) async { + Future saveQuestionsInformation({String? notes, String? chiefComplaint, int? projectId, DateTime? selectedTime, List? selectedQuestions}) async { setState(ViewState.BusyLocal); - await _edOnlineServices.saveQuestionsInformation( - notes: notes, - projectId: projectId, - chiefComplaint: chiefComplaint, - selectedTime: selectedTime, - selectedQuestions: selectedQuestions); + await _edOnlineServices.saveQuestionsInformation(notes: notes, projectId: projectId, chiefComplaint: chiefComplaint, selectedTime: selectedTime, selectedQuestions: selectedQuestions); if (_edOnlineServices.hasError) { - error = _edOnlineServices.error; + error = _edOnlineServices.error!; setState(ViewState.ErrorLocal); } else setState(ViewState.Idle); diff --git a/lib/core/viewModels/er/am_request_view_model.dart b/lib/core/viewModels/er/am_request_view_model.dart index aff532d7..35ff8053 100644 --- a/lib/core/viewModels/er/am_request_view_model.dart +++ b/lib/core/viewModels/er/am_request_view_model.dart @@ -36,15 +36,15 @@ class AmRequestViewModel extends BaseViewModel { bool get hasPendingOrder =>_amService.hasPendingOrder; - PickUpRequestPresOrder get pickUpRequestPresOrder =>_amService.pickUpRequestPresOrder; + PickUpRequestPresOrder get pickUpRequestPresOrder =>_amService.pickUpRequestPresOrder!; - AmbulanceRequestOrdersModel get pendingAmbulanceRequestOrder =>_amService.pendingAmbulanceRequestOrder; + AmbulanceRequestOrdersModel get pendingAmbulanceRequestOrder =>_amService.pendingAmbulanceRequestOrder!; Future getAppointmentHistory() async { setState(ViewState.BusyLocal); await _medicalService.getAppointmentHistory(isActiveAppointment: true); if (_medicalService.hasError) { - error = _medicalService.error; + error = _medicalService.error!; setState(ViewState.ErrorLocal); } else setState(ViewState.Idle); @@ -54,7 +54,7 @@ class AmRequestViewModel extends BaseViewModel { setState(ViewState.Busy); await _amService.getAllTransportationOrders(); if (_amService.hasError) { - error = _amService.error; + error = _amService.error!; setState(ViewState.Error); } else getHospitals(); @@ -64,7 +64,7 @@ class AmRequestViewModel extends BaseViewModel { setState(ViewState.Busy); await _hospitalService.getHospitals(isResBasedOnLoc: false); if (_hospitalService.hasError) { - error = _hospitalService.error; + error = _hospitalService.error!; setState(ViewState.Error); } else // getPatientAllPresOrdersList(); @@ -73,9 +73,9 @@ class AmRequestViewModel extends BaseViewModel { Future getPatientAllPresOrdersListRC() async { setState(ViewState.Busy); - await _amService.getPatientAllPresOrdersListRC(authenticatedUserObject.user.patientID); + await _amService.getPatientAllPresOrdersListRC(authenticatedUserObject.user!.patientID); if (_hospitalService.hasError) { - error = _hospitalService.error; + error = _hospitalService.error!; setState(ViewState.Error); } else setState(ViewState.Idle); @@ -85,7 +85,7 @@ class AmRequestViewModel extends BaseViewModel { setState(ViewState.Busy); await _amService.getPatientAllPresOrdersList(); if (_hospitalService.hasError) { - error = _hospitalService.error; + error = _hospitalService.error!; setState(ViewState.Error); } else if (_amService.hasPendingOrder) { getOrderDetails(); @@ -97,28 +97,28 @@ class AmRequestViewModel extends BaseViewModel { setState(ViewState.Busy); await _amService.getOrderDetails(); if (_amService.hasError) { - error = _amService.error; + error = _amService.error!; setState(ViewState.Error); } else setState(ViewState.Idle); } - Future updatePressOrder({@required int presOrderID}) async { + 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; + error = _amService.error!; setState(ViewState.Error); } else getPatientAllPresOrdersListRC(); } - Future insertERPressOrder({@required PatientER_RC patientER}) async { + Future insertERPressOrder({required PatientER_RC patientER}) async { setState(ViewState.Busy); await _amService.insertERPressOrder(patientER: patientER); if (_amService.hasError) { - error = _amService.error; + error = _amService.error!; setState(ViewState.ErrorLocal); } else // getAmRequestOrders(); diff --git a/lib/core/viewModels/er/near_hospital_view_model.dart b/lib/core/viewModels/er/near_hospital_view_model.dart index 4ff42a42..2f597568 100644 --- a/lib/core/viewModels/er/near_hospital_view_model.dart +++ b/lib/core/viewModels/er/near_hospital_view_model.dart @@ -11,7 +11,7 @@ class NearHospitalViewModel extends BaseViewModel { List get ProjectAvgERWaitingTimeModeList => _erService.projectAvgERWaitingTimeModelList; - getProjectAvgERWaitingTimeOrders({int id, int projectID}) async { + getProjectAvgERWaitingTimeOrders({int? id, int? projectID}) async { setState(ViewState.Busy); if (id != null && projectID != null) { @@ -21,7 +21,7 @@ class NearHospitalViewModel extends BaseViewModel { await _erService.getProjectAvgERWaitingTimeOrders(); } if (_erService.hasError) { - error = _erService.error; + error = _erService.error!; setState(ViewState.Error); } else setState(ViewState.Idle); diff --git a/lib/core/viewModels/er/rrt-view-model.dart b/lib/core/viewModels/er/rrt-view-model.dart index d615ef98..d3aa2b2a 100644 --- a/lib/core/viewModels/er/rrt-view-model.dart +++ b/lib/core/viewModels/er/rrt-view-model.dart @@ -22,7 +22,7 @@ class RRTService extends BaseService {} class _RRTServiceData { List pendingOrders = []; List completedOrders = []; - ServicePrice servicePrice; + ServicePrice? servicePrice; // RRTProcedureList rrtProcedureList; } @@ -47,7 +47,7 @@ class RRTViewModel extends BaseViewModel { return rrtServiceData; } - Future createOrder(Map body) async { + Future createOrder(Map body) async { body['IdentificationNo'] = user.patientIdentificationNo; body['NationalityID'] = user.nationalityID; body['CreatedBy'] = user.patientIdentificationType; @@ -56,13 +56,14 @@ class RRTViewModel extends BaseViewModel { int requestNo; await _service.baseAppClient.post(PATIENT_ER_INSERT_PRES_ORDER, body: body, onSuccess: (response, statusCode) { requestNo = response['RequestNo']; + return requestNo; }, onFailure: (error, statusCode) { AppToast.showErrorToast(message: error); + return error; }); - return requestNo; } - Future createOrderRC(Map body) async { + Future createOrderRC(Map body) async { // body['IdentificationNo'] = user.patientIdentificationNo; // body['NationalityID'] = user.nationalityID; // body['CreatedBy'] = user.patientIdentificationType; @@ -71,10 +72,11 @@ class RRTViewModel extends BaseViewModel { int requestNo; await _service.baseAppClient.post(ADD_RRT_ORDER_RC, isRCService: true, body: body, onSuccess: (response, statusCode) { requestNo = response['response']; + return requestNo; }, onFailure: (error, statusCode) { AppToast.showErrorToast(message: error); + return error; }); - return requestNo; } // Service ID: 4 == RRT @@ -150,7 +152,7 @@ class RRTViewModel extends BaseViewModel { return response_; } - Future getServicePrice() async { + Future getServicePrice() async { Map body = {"IdentificationNo": user.patientIdentificationNo}; ServicePrice servicePrice; await _service.baseAppClient.post(GET_RRT_SERVICE_PRICE, body: body, onSuccess: (response, statusCode) { @@ -160,12 +162,14 @@ class RRTViewModel extends BaseViewModel { if (priceData != null) { servicePrice = ServicePrice.fromJson(priceData); rrtServiceData.servicePrice = servicePrice; + return servicePrice; } } + }, onFailure: (error, statusCode) { AppToast.showErrorToast(message: error); + return error; }); - return servicePrice; } Future cancelOrder(PrescriptionsOrder order, {String reason = ""}) async { @@ -194,7 +198,7 @@ class RRTViewModel extends BaseViewModel { return Future.value(success); } - Future> getAddresses() async { + Future?> getAddresses() async { Object error; try { var token = await sharedPref.getString(PHARMACY_AUTORZIE_TOKEN); @@ -213,7 +217,7 @@ class RRTViewModel extends BaseViewModel { setState(ViewState.Busy); await _customerAddressesService.getCustomerAddresses(); if (_customerAddressesService.hasError) { - error = _customerAddressesService.error; + error = _customerAddressesService.error!; setState(ViewState.ErrorLocal); } else { setState(ViewState.Idle); @@ -225,7 +229,7 @@ class RRTViewModel extends BaseViewModel { await _pharmacy_service.generatePharmacyToken(); if (_customerAddressesService.hasError) { - error = _customerAddressesService.error; + error = _customerAddressesService.error!; await _pharmacy_service.createUser(); setState(ViewState.ErrorLocal); } else { diff --git a/lib/core/viewModels/feedback/feedback_view_model.dart b/lib/core/viewModels/feedback/feedback_view_model.dart index 0aac283a..a064b5ea 100644 --- a/lib/core/viewModels/feedback/feedback_view_model.dart +++ b/lib/core/viewModels/feedback/feedback_view_model.dart @@ -15,11 +15,11 @@ class FeedbackViewModel extends BaseViewModel { List get appointHistoryList => _feedbackService.appointHistoryList; - Future sendCOCItem({String title, String details, String cOCTypeName, String attachment, AppoitmentAllHistoryResultList appointHistory}) async { + Future sendCOCItem({String? title, String? details, String? cOCTypeName, String? attachment, AppoitmentAllHistoryResultList? appointHistory}) async { setState(ViewState.BusyLocal); await _feedbackService.sendCOCItem(title: title, details: details, cOCTypeName: cOCTypeName, attachment: attachment, appointHistory: appointHistory); if (_feedbackService.hasError) { - error = _feedbackService.error; + error = _feedbackService.error!; setState(ViewState.ErrorLocal); return false; } else { @@ -32,7 +32,7 @@ class FeedbackViewModel extends BaseViewModel { setState(ViewState.Busy); await _feedbackService.getStatusCOC(); if (_feedbackService.hasError) { - error = _feedbackService.error; + error = _feedbackService.error!; setState(ViewState.Error); } else { setState(ViewState.Idle); @@ -43,7 +43,7 @@ class FeedbackViewModel extends BaseViewModel { setState(ViewState.Busy); await _feedbackService.searchFeedback(countryCode, phoneNumber, type, idNumber); if (_feedbackService.hasError) { - error = _feedbackService.error; + error = _feedbackService.error!; setState(ViewState.Error); } else { setState(ViewState.Idle); @@ -54,7 +54,7 @@ class FeedbackViewModel extends BaseViewModel { setState(ViewState.Busy); await _feedbackService.getPatentAppointmentHistory(); if (_feedbackService.hasError) { - error = _feedbackService.error; + error = _feedbackService.error!; setState(ViewState.Error); } else { setState(ViewState.Idle); diff --git a/lib/core/viewModels/medical/EyeViewModel.dart b/lib/core/viewModels/medical/EyeViewModel.dart index 3c10dc48..c6587c68 100644 --- a/lib/core/viewModels/medical/EyeViewModel.dart +++ b/lib/core/viewModels/medical/EyeViewModel.dart @@ -12,7 +12,7 @@ class EyeViewModel extends BaseViewModel { List get appoimentAllHistoryResultList => _eyeService.appoimentAllHistoryResultList; - List appointmentFilter = List(); + List appointmentFilter =[]; getEyeMeasurement() async { setState(ViewState.Busy); diff --git a/lib/core/viewModels/medical/ask_doctor_view_model.dart b/lib/core/viewModels/medical/ask_doctor_view_model.dart index abe2220c..7cdbc6e1 100644 --- a/lib/core/viewModels/medical/ask_doctor_view_model.dart +++ b/lib/core/viewModels/medical/ask_doctor_view_model.dart @@ -14,7 +14,7 @@ class AskDoctorViewModel extends BaseViewModel { AskDoctorService _askDoctorService = locator(); MyDoctorService _myDoctorService = locator(); - List patientDoctorAppointmentListHospital = List(); + List patientDoctorAppointmentListHospital =[]; List get askDoctorReqTypes => _askDoctorService.askDoctorReqTypes; diff --git a/lib/core/viewModels/medical/labs_view_model.dart b/lib/core/viewModels/medical/labs_view_model.dart index 4fbab4e6..fec764ee 100644 --- a/lib/core/viewModels/medical/labs_view_model.dart +++ b/lib/core/viewModels/medical/labs_view_model.dart @@ -22,8 +22,8 @@ class LabsViewModel extends BaseViewModel { String get labReportPDF => _labsService.labReportPDF; - List _patientLabOrdersListClinic = List(); - List _patientLabOrdersListHospital = List(); + List _patientLabOrdersListClinic =[]; + List _patientLabOrdersListHospital =[]; List get patientLabOrdersList => filterType == FilterType.Clinic ? _patientLabOrdersListClinic : _patientLabOrdersListHospital; @@ -72,7 +72,7 @@ class LabsViewModel extends BaseViewModel { List get labResultList => _labsService.labResultList; - List labResultLists = List(); + List labResultLists =[]; getLaboratoryResult({String projectID, int clinicID, String invoiceNo, String orderNo, String setupID, bool isVidaPlus}) async { setState(ViewState.Busy); diff --git a/lib/core/viewModels/medical/my_doctor_view_model.dart b/lib/core/viewModels/medical/my_doctor_view_model.dart index 266157ff..da709fdb 100644 --- a/lib/core/viewModels/medical/my_doctor_view_model.dart +++ b/lib/core/viewModels/medical/my_doctor_view_model.dart @@ -13,9 +13,9 @@ class MyDoctorViewModel extends BaseViewModel { MyDoctorService _myDoctorService = locator(); List _patientDoctorAppointmentListClinic = - List(); + []; List _patientDoctorAppointmentListHospital = - List(); + []; List get patientDoctorAppointmentList => filterType == FilterType.Clinic diff --git a/lib/core/viewModels/medical/prescriptions_view_model.dart b/lib/core/viewModels/medical/prescriptions_view_model.dart index 98a5b1b7..afbee507 100644 --- a/lib/core/viewModels/medical/prescriptions_view_model.dart +++ b/lib/core/viewModels/medical/prescriptions_view_model.dart @@ -19,8 +19,8 @@ class PrescriptionsViewModel extends BaseViewModel { FilterType filterType = FilterType.Clinic; PrescriptionsService _prescriptionsService = locator(); - List _prescriptionsOrderListClinic = List(); - List _prescriptionsOrderListHospital = List(); + List _prescriptionsOrderListClinic =[]; + List _prescriptionsOrderListHospital =[]; List get prescriptionReportList => _prescriptionsService.prescriptionReportList; diff --git a/lib/core/viewModels/medical/radiology_view_model.dart b/lib/core/viewModels/medical/radiology_view_model.dart index 3ee6fedf..55faad77 100644 --- a/lib/core/viewModels/medical/radiology_view_model.dart +++ b/lib/core/viewModels/medical/radiology_view_model.dart @@ -13,8 +13,8 @@ class RadiologyViewModel extends BaseViewModel { FilterType filterType = FilterType.Clinic; RadiologyService _radiologyService = locator(); - List _finalRadiologyListClinic = List(); - List _finalRadiologyListHospital = List(); + List _finalRadiologyListClinic =[]; + List _finalRadiologyListHospital =[]; List get finalRadiologyList => filterType == FilterType.Clinic ? _finalRadiologyListClinic : _finalRadiologyListHospital; diff --git a/lib/core/viewModels/medical/reports_view_model.dart b/lib/core/viewModels/medical/reports_view_model.dart index 8f55b3b7..4840a787 100644 --- a/lib/core/viewModels/medical/reports_view_model.dart +++ b/lib/core/viewModels/medical/reports_view_model.dart @@ -14,13 +14,13 @@ class ReportsViewModel extends BaseViewModel { ReportsService _reportsService = locator(); - List reportsOrderRequestList = List(); - List reportsOrderReadyList = List(); - List reportsOrderCanceledList = List(); + List reportsOrderRequestList =[]; + List reportsOrderReadyList =[]; + List reportsOrderCanceledList =[]; - List reportsInPatientOrderRequestList = List(); - List reportsInPatientOrderReadyList = List(); - List reportsInPatientOrderCanceledList = List(); + List reportsInPatientOrderRequestList =[]; + List reportsInPatientOrderReadyList =[]; + List reportsInPatientOrderCanceledList =[]; List get appointHistoryList => _reportsService.appointHistoryList; diff --git a/lib/core/viewModels/pharmacyModule/OrderPreviewViewModel.dart b/lib/core/viewModels/pharmacyModule/OrderPreviewViewModel.dart index eb074e59..20c8a6bc 100644 --- a/lib/core/viewModels/pharmacyModule/OrderPreviewViewModel.dart +++ b/lib/core/viewModels/pharmacyModule/OrderPreviewViewModel.dart @@ -121,7 +121,7 @@ class OrderPreviewViewModel extends BaseViewModel { cartResponse.subtotalWithVat = res["subtotal_with_vat"]; cartResponse.subtotalVatAmount = res["subtotal_vat_amount"]; cartResponse.subtotalVatRate = res["subtotal_vat_rate"]; - cartResponse.shoppingCarts = List(); + cartResponse.shoppingCarts =[]; if (paymentCheckoutData.shippingOption != null) { totalAdditionalShippingCharge = paymentCheckoutData.shippingOption.rate; diff --git a/lib/core/viewModels/pharmacyModule/pharmacy_module_view_model.dart b/lib/core/viewModels/pharmacyModule/pharmacy_module_view_model.dart index 27fe3234..bc869edc 100644 --- a/lib/core/viewModels/pharmacyModule/pharmacy_module_view_model.dart +++ b/lib/core/viewModels/pharmacyModule/pharmacy_module_view_model.dart @@ -74,7 +74,7 @@ class PharmacyModuleViewModel extends BaseViewModel { } List getBannerImagesUrl(ProjectViewModel projectViewModel) { - List images = List(); + List images =[]; images.add('assets/images/pharmacy_module/pharmacy_logo_green.png'); if (projectViewModel.isArabic) diff --git a/lib/core/viewModels/pharmacyModule/product_detail_view_model.dart b/lib/core/viewModels/pharmacyModule/product_detail_view_model.dart index 23952514..a59c080c 100644 --- a/lib/core/viewModels/pharmacyModule/product_detail_view_model.dart +++ b/lib/core/viewModels/pharmacyModule/product_detail_view_model.dart @@ -97,7 +97,7 @@ class ProductDetailViewModel extends BaseViewModel { cartResponse.subtotalWithVat = res["subtotal_with_vat"]; cartResponse.subtotalVatAmount = res["subtotal_vat_amount"]; cartResponse.subtotalVatRate = res["subtotal_vat_rate"]; - cartResponse.shoppingCarts = List(); + cartResponse.shoppingCarts =[]; res["shopping_carts"].forEach((item) { ShoppingCart shoppingCart = ShoppingCart.fromJson(item); cartResponse.shoppingCarts.add(shoppingCart); diff --git a/lib/core/viewModels/pharmacy_categorise_view_model.dart b/lib/core/viewModels/pharmacy_categorise_view_model.dart index 2be2f14c..ef2e5a65 100644 --- a/lib/core/viewModels/pharmacy_categorise_view_model.dart +++ b/lib/core/viewModels/pharmacy_categorise_view_model.dart @@ -17,8 +17,8 @@ class PharmacyCategoriseViewModel extends BaseViewModel { int inPatientPageSize = 20; int lastSubsetIndex = 20; - List filteredInPatientItems = List(); - List filteredMyInPatientItems = List(); + List filteredInPatientItems =[]; + List filteredMyInPatientItems =[]; PharmacyCategoriseService _pharmacyCategoriseService = locator(); diff --git a/lib/core/viewModels/project_view_model.dart b/lib/core/viewModels/project_view_model.dart index d3b7566c..3c920199 100644 --- a/lib/core/viewModels/project_view_model.dart +++ b/lib/core/viewModels/project_view_model.dart @@ -57,9 +57,9 @@ class ProjectViewModel extends BaseViewModel { bool get isArabic => _isArabic; bool isLoginChild = false; - List privilegeRootUser = List(); - List privilegeChildUser = List(); - List _vidaPlusProjectListModel = List(); + List privilegeRootUser =[]; + List privilegeChildUser =[]; + List _vidaPlusProjectListModel =[]; List get privileges => isLoginChild ? privilegeChildUser : privilegeChildUser; @@ -131,7 +131,7 @@ class ProjectViewModel extends BaseViewModel { } setPrivilege({privilegeList, bool isLoginChild = false}) { - List privilege = List(); + List privilege =[]; privilegeList['List'][0]['ListPrivilege'].forEach((item) { privilege.add(PrivilegeModel.fromJson(item)); diff --git a/lib/models/Appointments/AppoimentAllHistoryResultList.dart b/lib/models/Appointments/AppoimentAllHistoryResultList.dart index a79767c5..9f68e16b 100644 --- a/lib/models/Appointments/AppoimentAllHistoryResultList.dart +++ b/lib/models/Appointments/AppoimentAllHistoryResultList.dart @@ -288,7 +288,7 @@ class AppoitmentAllHistoryResultList { class PatientAppointmentList { String filterName = ""; - List patientDoctorAppointmentList = List(); + List patientDoctorAppointmentList =[]; PatientAppointmentList( {this.filterName, diff --git a/lib/models/Appointments/DoctorListResponse.dart b/lib/models/Appointments/DoctorListResponse.dart index f7a19c3a..5922f5b7 100644 --- a/lib/models/Appointments/DoctorListResponse.dart +++ b/lib/models/Appointments/DoctorListResponse.dart @@ -190,7 +190,7 @@ class DoctorList { class PatientDoctorAppointmentList { String filterName = ""; String distanceInKMs = ""; - List patientDoctorAppointmentList = List(); + List patientDoctorAppointmentList =[]; PatientDoctorAppointmentList( {this.filterName, diff --git a/lib/pages/AlHabibMedicalService/h2o/h20_setting.dart b/lib/pages/AlHabibMedicalService/h2o/h20_setting.dart index 2feb7f0f..3c545336 100644 --- a/lib/pages/AlHabibMedicalService/h2o/h20_setting.dart +++ b/lib/pages/AlHabibMedicalService/h2o/h20_setting.dart @@ -34,8 +34,8 @@ class _H2oSettingState extends State { TextEditingController _nameController = TextEditingController(); TextEditingController _heightController = TextEditingController(); TextEditingController _weightController = TextEditingController(); - List _weightPopupList = List(); - List _heightPopupList = List(); + List _weightPopupList =[]; + List _heightPopupList =[]; bool _isUnitML = true; bool _isGenderMale = false; diff --git a/lib/pages/AlHabibMedicalService/health_calculator/bmi_calculator/bariatrics-screen.dart b/lib/pages/AlHabibMedicalService/health_calculator/bmi_calculator/bariatrics-screen.dart index 13de0140..01378b04 100644 --- a/lib/pages/AlHabibMedicalService/health_calculator/bmi_calculator/bariatrics-screen.dart +++ b/lib/pages/AlHabibMedicalService/health_calculator/bmi_calculator/bariatrics-screen.dart @@ -31,7 +31,7 @@ class BariatricsPage extends StatefulWidget { } class _BariatricsPageState extends State { - DiseasesByClinic _selectedDisease; + DiseasesByClinic? _selectedDisease; @override Widget build(BuildContext context) { @@ -145,7 +145,7 @@ class _BariatricsPageState extends State { List arrDistance = []; List result; int numAll; - List _patientDoctorAppointmentListHospital = List(); + List _patientDoctorAppointmentListHospital =[]; DoctorsListService service = new DoctorsListService(); service.getDoctorsList(108, 0, false, context).then((res) { diff --git a/lib/pages/AlHabibMedicalService/health_calculator/bmi_calculator/bmi_calculator.dart b/lib/pages/AlHabibMedicalService/health_calculator/bmi_calculator/bmi_calculator.dart index 08b756ee..955dd646 100644 --- a/lib/pages/AlHabibMedicalService/health_calculator/bmi_calculator/bmi_calculator.dart +++ b/lib/pages/AlHabibMedicalService/health_calculator/bmi_calculator/bmi_calculator.dart @@ -28,8 +28,8 @@ class _BMICalculatorState extends State { TextEditingController _heightController = TextEditingController(); TextEditingController _weightController = TextEditingController(); - List _weightPopupList = List(); - List _heightPopupList = List(); + List _weightPopupList =[]; + List _heightPopupList =[]; bool _isHeightCM = true; bool _isWeightKG = true; diff --git a/lib/pages/AlHabibMedicalService/health_calculator/bmi_calculator/result_page.dart b/lib/pages/AlHabibMedicalService/health_calculator/bmi_calculator/result_page.dart index fa12a9fe..d01a6935 100644 --- a/lib/pages/AlHabibMedicalService/health_calculator/bmi_calculator/result_page.dart +++ b/lib/pages/AlHabibMedicalService/health_calculator/bmi_calculator/result_page.dart @@ -143,7 +143,7 @@ class _ResultPageState extends State { List arrDistance = []; List result; int numAll; - List _patientDoctorAppointmentListHospital = List(); + List _patientDoctorAppointmentListHospital =[]; DoctorsListService service = new DoctorsListService(); service.getDoctorsList(108, 0, false, context).then((res) { diff --git a/lib/pages/AlHabibMedicalService/health_calculator/bmr_calculator/bmr_calculator.dart b/lib/pages/AlHabibMedicalService/health_calculator/bmr_calculator/bmr_calculator.dart index 62020a62..3c215366 100644 --- a/lib/pages/AlHabibMedicalService/health_calculator/bmr_calculator/bmr_calculator.dart +++ b/lib/pages/AlHabibMedicalService/health_calculator/bmr_calculator/bmr_calculator.dart @@ -42,8 +42,8 @@ class _BmrCalculatorState extends State { double _heightValue = 150; double _weightValue = 40; - List _heightPopupList = List(); - List _weightPopupList = List(); + List _heightPopupList =[]; + List _weightPopupList =[]; // int age = 0; // int height = 0; diff --git a/lib/pages/AlHabibMedicalService/health_calculator/bmr_calculator/bmr_result_page.dart b/lib/pages/AlHabibMedicalService/health_calculator/bmr_calculator/bmr_result_page.dart index 4ef6ad08..ef098492 100644 --- a/lib/pages/AlHabibMedicalService/health_calculator/bmr_calculator/bmr_result_page.dart +++ b/lib/pages/AlHabibMedicalService/health_calculator/bmr_calculator/bmr_result_page.dart @@ -115,7 +115,7 @@ class BmrResultPage extends StatelessWidget { BariatricsService service = new BariatricsService(); List doctorsList = []; - List _patientDoctorAppointmentListHospital = List(); + List _patientDoctorAppointmentListHospital =[]; service.getCalculationDoctors(calculationID: 3).then((res) { GifLoaderDialogUtils.hideDialog(context); diff --git a/lib/pages/AlHabibMedicalService/health_calculator/body_fat/body_fat.dart b/lib/pages/AlHabibMedicalService/health_calculator/body_fat/body_fat.dart index 6aab447a..4fb1c118 100644 --- a/lib/pages/AlHabibMedicalService/health_calculator/body_fat/body_fat.dart +++ b/lib/pages/AlHabibMedicalService/health_calculator/body_fat/body_fat.dart @@ -37,10 +37,10 @@ class _BodyFatState extends State { TextEditingController _waistController = TextEditingController(); TextEditingController _hipController = TextEditingController(); - List _heightPopupList = List(); - List _neckPopupList = List(); - List _waistPopupList = List(); - List _hipPopupList = List(); + List _heightPopupList =[]; + List _neckPopupList =[]; + List _waistPopupList =[]; + List _hipPopupList =[]; bool isMale = false; diff --git a/lib/pages/AlHabibMedicalService/health_calculator/body_fat/body_fat_result_page.dart b/lib/pages/AlHabibMedicalService/health_calculator/body_fat/body_fat_result_page.dart index 3c0b56cf..d51861f4 100644 --- a/lib/pages/AlHabibMedicalService/health_calculator/body_fat/body_fat_result_page.dart +++ b/lib/pages/AlHabibMedicalService/health_calculator/body_fat/body_fat_result_page.dart @@ -118,7 +118,7 @@ class FatResult extends StatelessWidget { BariatricsService service = new BariatricsService(); List doctorsList = []; - List _patientDoctorAppointmentListHospital = List(); + List _patientDoctorAppointmentListHospital =[]; service.getCalculationDoctors(calculationID: 5).then((res) { GifLoaderDialogUtils.hideDialog(context); diff --git a/lib/pages/AlHabibMedicalService/health_calculator/calorie_calculator/calorie_calculator.dart b/lib/pages/AlHabibMedicalService/health_calculator/calorie_calculator/calorie_calculator.dart index b7e00652..502da608 100644 --- a/lib/pages/AlHabibMedicalService/health_calculator/calorie_calculator/calorie_calculator.dart +++ b/lib/pages/AlHabibMedicalService/health_calculator/calorie_calculator/calorie_calculator.dart @@ -37,8 +37,8 @@ class _CalorieCalculatorState extends State { TextEditingController _heightController = new TextEditingController(); TextEditingController _weightController = TextEditingController(); - List _heightPopupList = List(); - List _weightPopupList = List(); + List _heightPopupList =[]; + List _weightPopupList =[]; // int age = 0; // int height = 0; diff --git a/lib/pages/AlHabibMedicalService/health_calculator/calorie_calculator/calorie_result_page.dart b/lib/pages/AlHabibMedicalService/health_calculator/calorie_calculator/calorie_result_page.dart index 68bd2d2c..52d56ac7 100644 --- a/lib/pages/AlHabibMedicalService/health_calculator/calorie_calculator/calorie_result_page.dart +++ b/lib/pages/AlHabibMedicalService/health_calculator/calorie_calculator/calorie_result_page.dart @@ -114,7 +114,7 @@ class CalorieResultPage extends StatelessWidget { BariatricsService service = new BariatricsService(); List doctorsList = []; - List _patientDoctorAppointmentListHospital = List(); + List _patientDoctorAppointmentListHospital =[]; service.getCalculationDoctors(calculationID: 2).then((res) { GifLoaderDialogUtils.hideDialog(context); diff --git a/lib/pages/AlHabibMedicalService/health_calculator/carbs/carbs_result_page.dart b/lib/pages/AlHabibMedicalService/health_calculator/carbs/carbs_result_page.dart index d9f70ab9..88727a2b 100644 --- a/lib/pages/AlHabibMedicalService/health_calculator/carbs/carbs_result_page.dart +++ b/lib/pages/AlHabibMedicalService/health_calculator/carbs/carbs_result_page.dart @@ -138,7 +138,7 @@ class CarbsResult extends StatelessWidget { BariatricsService service = new BariatricsService(); List doctorsList = []; - List _patientDoctorAppointmentListHospital = List(); + List _patientDoctorAppointmentListHospital =[]; service.getCalculationDoctors(calculationID: 11).then((res) { GifLoaderDialogUtils.hideDialog(context); diff --git a/lib/pages/AlHabibMedicalService/health_calculator/delivery_due/delivery_due_result_page.dart b/lib/pages/AlHabibMedicalService/health_calculator/delivery_due/delivery_due_result_page.dart index f7431d1a..7da0ae06 100644 --- a/lib/pages/AlHabibMedicalService/health_calculator/delivery_due/delivery_due_result_page.dart +++ b/lib/pages/AlHabibMedicalService/health_calculator/delivery_due/delivery_due_result_page.dart @@ -137,7 +137,7 @@ class DeliveryDueResult extends StatelessWidget { BariatricsService service = new BariatricsService(); List doctorsList = []; - List _patientDoctorAppointmentListHospital = List(); + List _patientDoctorAppointmentListHospital =[]; service.getCalculationDoctors(calculationID: 6).then((res) { GifLoaderDialogUtils.hideDialog(context); diff --git a/lib/pages/AlHabibMedicalService/health_calculator/ideal_body/ideal_body.dart b/lib/pages/AlHabibMedicalService/health_calculator/ideal_body/ideal_body.dart index a11915da..ec4689b0 100644 --- a/lib/pages/AlHabibMedicalService/health_calculator/ideal_body/ideal_body.dart +++ b/lib/pages/AlHabibMedicalService/health_calculator/ideal_body/ideal_body.dart @@ -48,8 +48,8 @@ class _IdealBodyState extends State { TextEditingController _heightController = new TextEditingController(); TextEditingController _weightController = TextEditingController(); - List _heightPopupList = List(); - List _weightPopupList = List(); + List _heightPopupList =[]; + List _weightPopupList =[]; void calculateIdealWeight() { var height = int.parse(_heightController.text); diff --git a/lib/pages/AlHabibMedicalService/health_calculator/ideal_body/ideal_body_result_page.dart b/lib/pages/AlHabibMedicalService/health_calculator/ideal_body/ideal_body_result_page.dart index 0477fda4..53a6f8a2 100644 --- a/lib/pages/AlHabibMedicalService/health_calculator/ideal_body/ideal_body_result_page.dart +++ b/lib/pages/AlHabibMedicalService/health_calculator/ideal_body/ideal_body_result_page.dart @@ -214,7 +214,7 @@ class IdealBodyResult extends StatelessWidget { BariatricsService service = new BariatricsService(); List doctorsList = []; - List _patientDoctorAppointmentListHospital = List(); + List _patientDoctorAppointmentListHospital =[]; service.getCalculationDoctors(calculationID: 4).then((res) { GifLoaderDialogUtils.hideDialog(context); diff --git a/lib/pages/AlHabibMedicalService/health_calculator/ovulation_period/ovulation_result_page.dart b/lib/pages/AlHabibMedicalService/health_calculator/ovulation_period/ovulation_result_page.dart index 67ec7dea..15dcce58 100644 --- a/lib/pages/AlHabibMedicalService/health_calculator/ovulation_period/ovulation_result_page.dart +++ b/lib/pages/AlHabibMedicalService/health_calculator/ovulation_period/ovulation_result_page.dart @@ -147,7 +147,7 @@ class OvulationResult extends StatelessWidget { BariatricsService service = new BariatricsService(); List doctorsList = []; - List _patientDoctorAppointmentListHospital = List(); + List _patientDoctorAppointmentListHospital =[]; service.getCalculationDoctors(calculationID: 6).then((res) { GifLoaderDialogUtils.hideDialog(context); diff --git a/lib/pages/AlHabibMedicalService/health_converter.dart b/lib/pages/AlHabibMedicalService/health_converter.dart index c4ad7760..484b81d7 100644 --- a/lib/pages/AlHabibMedicalService/health_converter.dart +++ b/lib/pages/AlHabibMedicalService/health_converter.dart @@ -46,7 +46,7 @@ class _HealthConverterState extends State { } List myOptionsList(BuildContext context) { - List medical = List(); + List medical =[]; medical.add(InkWell( onTap: () => Navigator.push( diff --git a/lib/pages/AlHabibMedicalService/​ health_calculators.dart b/lib/pages/AlHabibMedicalService/​ health_calculators.dart index 67f27337..f118b793 100644 --- a/lib/pages/AlHabibMedicalService/​ health_calculators.dart +++ b/lib/pages/AlHabibMedicalService/​ health_calculators.dart @@ -138,7 +138,7 @@ class _HealthCalculatorsState extends State with SingleTicker } List getGeneralHealthList(BuildContext context) { - List medical = List(); + List medical =[]; medical.add(InkWell( onTap: () => Navigator.push( @@ -222,7 +222,7 @@ class _HealthCalculatorsState extends State with SingleTicker } List getWomenHealthList(BuildContext context) { - List medical = List(); + List medical =[]; medical.add(InkWell( onTap: () => Navigator.push( diff --git a/lib/pages/Blood/blood_donation.dart b/lib/pages/Blood/blood_donation.dart index 717be242..417b13ea 100644 --- a/lib/pages/Blood/blood_donation.dart +++ b/lib/pages/Blood/blood_donation.dart @@ -45,7 +45,7 @@ class _BloodDonationPageState extends State { List_BloodGroupDetailsModel bloodDetails = List_BloodGroupDetailsModel(bloodGroup: "A-"); AppSharedPreferences sharedPref = AppSharedPreferences(); var checkedValue = false; - List imagesInfo = List(); + List imagesInfo =[]; ProjectViewModel projectProvider; diff --git a/lib/pages/BookAppointment/DentalComplaints.dart b/lib/pages/BookAppointment/DentalComplaints.dart index 27cb951e..cc6c5bba 100644 --- a/lib/pages/BookAppointment/DentalComplaints.dart +++ b/lib/pages/BookAppointment/DentalComplaints.dart @@ -44,7 +44,7 @@ class _DentalComplaintsState extends State { List doctorsList = []; DentalProceduresModel dentalProceduresModel; - List patientDoctorAppointmentListHospital = List(); + List patientDoctorAppointmentListHospital =[]; ProjectViewModel projectViewModel; diff --git a/lib/pages/BookAppointment/DoctorProfile.dart b/lib/pages/BookAppointment/DoctorProfile.dart index 426df212..058fb650 100644 --- a/lib/pages/BookAppointment/DoctorProfile.dart +++ b/lib/pages/BookAppointment/DoctorProfile.dart @@ -55,7 +55,7 @@ class _DoctorProfileState extends State with TickerProviderStateM dynamic doctorSchedule; AppSharedPreferences sharedPref = AppSharedPreferences(); - List doctorDetailsList = List(); + List doctorDetailsList =[]; @override void initState() { diff --git a/lib/pages/BookAppointment/components/LaserClinic.dart b/lib/pages/BookAppointment/components/LaserClinic.dart index 918ca9ad..77a94d62 100644 --- a/lib/pages/BookAppointment/components/LaserClinic.dart +++ b/lib/pages/BookAppointment/components/LaserClinic.dart @@ -210,7 +210,7 @@ class _LaserClinicState extends State with SingleTickerProviderStat List arrDistance = []; List result; int numAll; - List _patientDoctorAppointmentListHospital = List(); + List _patientDoctorAppointmentListHospital =[]; DoctorsListService service = new DoctorsListService(); projectViewModel.selectedBodyPartList = _selectedBodyPartList; diff --git a/lib/pages/BookAppointment/components/SearchByClinic.dart b/lib/pages/BookAppointment/components/SearchByClinic.dart index 26deb0f8..467ce2a7 100644 --- a/lib/pages/BookAppointment/components/SearchByClinic.dart +++ b/lib/pages/BookAppointment/components/SearchByClinic.dart @@ -578,7 +578,7 @@ class _SearchByClinicState extends State { List arrDistance = []; List result; int numAll; - List _patientDoctorAppointmentListHospital = List(); + List _patientDoctorAppointmentListHospital =[]; DoctorsListService service = new DoctorsListService(); service.getDoctorsList(clinicID, projectDropdownValue != "" ? int.parse(projectDropdownValue) : 0, nearestAppo, context).then((res) { diff --git a/lib/pages/BookAppointment/components/SearchByDoctor.dart b/lib/pages/BookAppointment/components/SearchByDoctor.dart index 4425d926..a280bf40 100644 --- a/lib/pages/BookAppointment/components/SearchByDoctor.dart +++ b/lib/pages/BookAppointment/components/SearchByDoctor.dart @@ -94,7 +94,7 @@ class _SearchByDoctorState extends State { List doctorsList = []; DoctorsListService service = new DoctorsListService(); - List _patientDoctorAppointmentListHospital = List(); + List _patientDoctorAppointmentListHospital =[]; service.getDoctorsListByName(doctorNameController.text, context).then((res) { // GifLoaderDialogUtils.hideDialog(context); diff --git a/lib/pages/BookAppointment/widgets/DentalComplaintCard.dart b/lib/pages/BookAppointment/widgets/DentalComplaintCard.dart index 83b298f2..61338f00 100644 --- a/lib/pages/BookAppointment/widgets/DentalComplaintCard.dart +++ b/lib/pages/BookAppointment/widgets/DentalComplaintCard.dart @@ -61,7 +61,7 @@ class _DentalComplaintCardState extends State { getChiefComplaintsList() { List doctorsList = []; - List _patientDoctorAppointmentListHospital = List(); + List _patientDoctorAppointmentListHospital =[]; GifLoaderDialogUtils.showMyDialog(context); ClinicListService service = new ClinicListService(); diff --git a/lib/pages/ChildVaccines/add_newchild_page.dart b/lib/pages/ChildVaccines/add_newchild_page.dart index 0711fa85..fc5d2605 100644 --- a/lib/pages/ChildVaccines/add_newchild_page.dart +++ b/lib/pages/ChildVaccines/add_newchild_page.dart @@ -24,7 +24,7 @@ class AddNewChildPage extends StatefulWidget { final String itemDescription; String dateAdd; - List _scheduleList = List(); + List _scheduleList =[]; List daysOfWeek = [DayOfWeek.Monday, DayOfWeek.Tuesday, DayOfWeek.Wednesday, DayOfWeek.Thursday, DayOfWeek.Friday, DayOfWeek.Saturday, DayOfWeek.Sunday]; DateTime startDay; diff --git a/lib/pages/ContactUs/LiveChat/livechat_page.dart b/lib/pages/ContactUs/LiveChat/livechat_page.dart index 6070ab51..5407b251 100644 --- a/lib/pages/ContactUs/LiveChat/livechat_page.dart +++ b/lib/pages/ContactUs/LiveChat/livechat_page.dart @@ -14,7 +14,7 @@ class LiveChatPage extends StatefulWidget { class _LiveChatPageState extends State with SingleTickerProviderStateMixin { TabController _tabController; - List imagesInfo = List(); + List imagesInfo =[]; @override void initState() { diff --git a/lib/pages/ContactUs/contact_us_page.dart b/lib/pages/ContactUs/contact_us_page.dart index 43db6486..f30839f4 100644 --- a/lib/pages/ContactUs/contact_us_page.dart +++ b/lib/pages/ContactUs/contact_us_page.dart @@ -62,7 +62,7 @@ class _ContactUsPageState extends State { } List myOptionsList(BuildContext context) { - List medical = List(); + List medical =[]; medical.add(InkWell( onTap: () => Navigator.push( diff --git a/lib/pages/Covid-DriveThru/covid-drivethru-location.dart b/lib/pages/Covid-DriveThru/covid-drivethru-location.dart index c85f53ae..8578e9a2 100644 --- a/lib/pages/Covid-DriveThru/covid-drivethru-location.dart +++ b/lib/pages/Covid-DriveThru/covid-drivethru-location.dart @@ -35,7 +35,7 @@ class _CovidDrivethruLocationState extends State { String projectLong = ""; String projectName = ""; String projectID = ""; - List imagesInfo = List(); + List imagesInfo =[]; DriveThroughTestingCenterModel selectedProject; final GlobalKey locationDropdownKey = GlobalKey(); diff --git a/lib/pages/DrawerPages/family/my-family.dart b/lib/pages/DrawerPages/family/my-family.dart index 0eedf483..edef77a3 100644 --- a/lib/pages/DrawerPages/family/my-family.dart +++ b/lib/pages/DrawerPages/family/my-family.dart @@ -48,7 +48,7 @@ class MyFamily extends StatefulWidget { } class _MyFamily extends State with TickerProviderStateMixin { - List imagesInfo = List(); + List imagesInfo =[]; final familyFileProvider = FamilyFilesProvider(); AppSharedPreferences sharedPref = new AppSharedPreferences(); var userID; diff --git a/lib/pages/ErService/AmbulanceReq.dart b/lib/pages/ErService/AmbulanceReq.dart index 3803bcd4..ec44fbfd 100644 --- a/lib/pages/ErService/AmbulanceReq.dart +++ b/lib/pages/ErService/AmbulanceReq.dart @@ -20,7 +20,7 @@ class AmbulanceReq extends StatefulWidget { class _AmbulanceReqState extends State with SingleTickerProviderStateMixin { TabController _tabController; - List imagesInfo = List(); + List imagesInfo =[]; @override void initState() { diff --git a/lib/pages/ErService/EdOnline/DdServicesPage.dart b/lib/pages/ErService/EdOnline/DdServicesPage.dart index 4276e4ca..8b34420f 100644 --- a/lib/pages/ErService/EdOnline/DdServicesPage.dart +++ b/lib/pages/ErService/EdOnline/DdServicesPage.dart @@ -22,7 +22,7 @@ class _DdServicesPageState extends State { bool isAgree = false; TriageInformationRequest triageInformationRequest = new TriageInformationRequest(); - List selectedQuestions = List(); + List selectedQuestions =[]; @override void initState() { diff --git a/lib/pages/ErService/NearestEr.dart b/lib/pages/ErService/NearestEr.dart index d449f0e2..73029a43 100644 --- a/lib/pages/ErService/NearestEr.dart +++ b/lib/pages/ErService/NearestEr.dart @@ -25,7 +25,7 @@ class NearestEr extends StatefulWidget { } class _NearestErState extends State { - List projectAvgERWaitingTimeModelList = List(); + List projectAvgERWaitingTimeModelList =[]; bool isDataLoaded; LocationUtils locationUtils; diff --git a/lib/pages/ErService/rapid-response-team/rrt-main-screen.dart b/lib/pages/ErService/rapid-response-team/rrt-main-screen.dart index b56e28d5..e1aece5c 100644 --- a/lib/pages/ErService/rapid-response-team/rrt-main-screen.dart +++ b/lib/pages/ErService/rapid-response-team/rrt-main-screen.dart @@ -27,7 +27,7 @@ class RRTMainScreenState extends State with SingleTickerProviderS RRTViewModel viewModel; bool loadingData; - List imagesInfo = List(); + List imagesInfo =[]; ProjectViewModel projectViewModel; diff --git a/lib/pages/MyAppointments/AppointmentDetails.dart b/lib/pages/MyAppointments/AppointmentDetails.dart index 2a4c9386..61a96478 100644 --- a/lib/pages/MyAppointments/AppointmentDetails.dart +++ b/lib/pages/MyAppointments/AppointmentDetails.dart @@ -49,7 +49,7 @@ class _AppointmentDetailsState extends State with SingleTick static TabController _tabController; AppSharedPreferences sharedPref = AppSharedPreferences(); - List doctorDetailsList = List(); + List doctorDetailsList =[]; ToDoCountProviderModel toDoProvider; ProjectViewModel projectViewModel; diff --git a/lib/pages/MyAppointments/MyAppointments.dart b/lib/pages/MyAppointments/MyAppointments.dart index cccff881..061ebe8c 100644 --- a/lib/pages/MyAppointments/MyAppointments.dart +++ b/lib/pages/MyAppointments/MyAppointments.dart @@ -29,13 +29,13 @@ class MyAppointments extends StatefulWidget { List confirmedAppoList = []; List arrivedAppoList = []; - List _patientBookedAppointmentListHospital = List(); - List _patientConfirmedAppointmentListHospital = List(); - List _patientArrivedAppointmentListHospital = List(); + List _patientBookedAppointmentListHospital =[]; + List _patientConfirmedAppointmentListHospital =[]; + List _patientArrivedAppointmentListHospital =[]; - List _patientBookedAppointmentListClinic = List(); - List _patientConfirmedAppointmentListClinic = List(); - List _patientArrivedAppointmentListClinic = List(); + List _patientBookedAppointmentListClinic =[]; + List _patientConfirmedAppointmentListClinic =[]; + List _patientArrivedAppointmentListClinic =[]; @override _MyAppointmentsState createState() => _MyAppointmentsState(); @@ -46,7 +46,7 @@ class _MyAppointmentsState extends State with SingleTickerProvid var sharedPref = new AppSharedPreferences(); AuthenticatedUserObject authenticatedUserObject = locator(); - List imagesInfo = List(); + List imagesInfo =[]; FilterType filterType; diff --git a/lib/pages/ToDoList/ToDo.dart b/lib/pages/ToDoList/ToDo.dart index 75290ab1..85ecae5e 100644 --- a/lib/pages/ToDoList/ToDo.dart +++ b/lib/pages/ToDoList/ToDo.dart @@ -65,7 +65,7 @@ class ToDo extends StatefulWidget { class _ToDoState extends State with SingleTickerProviderStateMixin { AppSharedPreferences sharedPref = AppSharedPreferences(); - List imagesInfo = List(); + List imagesInfo =[]; ToDoCountProviderModel toDoProvider; CountdownTimerController controller; diff --git a/lib/pages/insurance/insurance_approval_screen.dart b/lib/pages/insurance/insurance_approval_screen.dart index bd665046..f0391ea7 100644 --- a/lib/pages/insurance/insurance_approval_screen.dart +++ b/lib/pages/insurance/insurance_approval_screen.dart @@ -26,7 +26,7 @@ class InsuranceApproval extends StatefulWidget { } class _InsuranceApprovalState extends State { - List imagesInfo = List(); + List imagesInfo =[]; @override Widget build(BuildContext context) { diff --git a/lib/pages/insurance/insurance_card_screen.dart b/lib/pages/insurance/insurance_card_screen.dart index 0788305d..15862f66 100644 --- a/lib/pages/insurance/insurance_card_screen.dart +++ b/lib/pages/insurance/insurance_card_screen.dart @@ -29,7 +29,7 @@ class InsuranceCard extends StatefulWidget { class _InsuranceCardState extends State { InsuranceCardService _insuranceCardService = locator(); - List imagesInfo = List(); + List imagesInfo =[]; @override Widget build(BuildContext context) { diff --git a/lib/pages/insurance/insurance_update_screen.dart b/lib/pages/insurance/insurance_update_screen.dart index 56f67282..bb8a67b4 100644 --- a/lib/pages/insurance/insurance_update_screen.dart +++ b/lib/pages/insurance/insurance_update_screen.dart @@ -18,7 +18,7 @@ class InsuranceUpdate extends StatefulWidget { class _InsuranceUpdateState extends State with SingleTickerProviderStateMixin { TabController _tabController; - List imagesInfo = List(); + List imagesInfo =[]; ProjectViewModel projectViewModel; @override diff --git a/lib/pages/livecare/livecare_home.dart b/lib/pages/livecare/livecare_home.dart index f7656d37..e50f3bb3 100644 --- a/lib/pages/livecare/livecare_home.dart +++ b/lib/pages/livecare/livecare_home.dart @@ -31,7 +31,7 @@ class _LiveCareHomeState extends State with SingleTickerProviderSt bool isDataLoaded = false; bool hasLiveCareRequest = false; - List imagesInfo = List(); + List imagesInfo =[]; List erRequestHistoryList; @@ -43,7 +43,7 @@ class _LiveCareHomeState extends State with SingleTickerProviderSt @override void initState() { _tabController = new TabController(length: 2, vsync: this); - erRequestHistoryList = List(); + erRequestHistoryList =[]; LiveCareHome.isLiveCareTypeSelected = false; pendingERRequestHistoryList = new ErRequestHistoryList(); imagesInfo.add(ImagesInfo( diff --git a/lib/pages/livecare/widgets/clinic_list.dart b/lib/pages/livecare/widgets/clinic_list.dart index 361d2381..9dc9421d 100644 --- a/lib/pages/livecare/widgets/clinic_list.dart +++ b/lib/pages/livecare/widgets/clinic_list.dart @@ -87,8 +87,8 @@ class _clinic_listState extends State { void initState() { liveCareClinicsListResponse = new LiveCareClinicsListResponse(); - liveCareOnlineClinicsListResponse = new List(); - liveCareOfflineClinicsListResponse = new List(); + liveCareOnlineClinicsListResponse = new[]; + liveCareOfflineClinicsListResponse = new[]; liveCareScheduleClinicsListResponse = new LiveCareScheduleClinicsListResponse(); @@ -760,7 +760,7 @@ class _clinic_listState extends State { List doctorsList = []; LiveCareService service = new LiveCareService(); GifLoaderDialogUtils.showMyDialog(context); - List _patientDoctorAppointmentListHospital = List(); + List _patientDoctorAppointmentListHospital =[]; service.getLiveCareScheduledDoctorList(context, selectedClinicID).then((res) { GifLoaderDialogUtils.hideDialog(context); if (res['MessageStatus'] == 1) { diff --git a/lib/pages/medical/active_medications/reminder_page.dart b/lib/pages/medical/active_medications/reminder_page.dart index 7ad8f9f2..45e6cf7d 100644 --- a/lib/pages/medical/active_medications/reminder_page.dart +++ b/lib/pages/medical/active_medications/reminder_page.dart @@ -22,7 +22,7 @@ class ReminderPage extends StatefulWidget { final int days; final String itemDescription; - List _scheduleList = List(); + List _scheduleList =[]; List daysOfWeek = [DayOfWeek.Monday, DayOfWeek.Tuesday, DayOfWeek.Wednesday, DayOfWeek.Thursday, DayOfWeek.Friday, DayOfWeek.Saturday, DayOfWeek.Sunday]; DateTime startDay; diff --git a/lib/pages/medical/allergies_page.dart b/lib/pages/medical/allergies_page.dart index b3f54a60..726c66a4 100644 --- a/lib/pages/medical/allergies_page.dart +++ b/lib/pages/medical/allergies_page.dart @@ -8,7 +8,7 @@ import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; class AllergiesPage extends StatelessWidget { - List imagesInfo = List(); + List imagesInfo =[]; @override Widget build(BuildContext context) { imagesInfo.add(ImagesInfo(imageEn: 'https://hmgwebservices.com/Images/MobileApp/imges-info/alllergies/en/0.png',imageAr: 'https://hmgwebservices.com/Images/MobileApp/imges-info/alllergies/ar/0.png')); diff --git a/lib/pages/medical/balance/advance_payment_page.dart b/lib/pages/medical/balance/advance_payment_page.dart index a07944f1..5000e07d 100644 --- a/lib/pages/medical/balance/advance_payment_page.dart +++ b/lib/pages/medical/balance/advance_payment_page.dart @@ -49,7 +49,7 @@ class _AdvancePaymentPageState extends State { AppSharedPreferences sharedPref = AppSharedPreferences(); AuthenticatedUser authUser; - List imagesInfo = List(); + List imagesInfo =[]; ProjectViewModel projectViewModel; diff --git a/lib/pages/medical/balance/my_balance_page.dart b/lib/pages/medical/balance/my_balance_page.dart index 6783c895..db3b8226 100644 --- a/lib/pages/medical/balance/my_balance_page.dart +++ b/lib/pages/medical/balance/my_balance_page.dart @@ -17,7 +17,7 @@ import 'package:provider/provider.dart'; import 'advance_payment_page.dart'; class MyBalancePage extends StatelessWidget { - List imagesInfo = List(); + List imagesInfo =[]; ProjectViewModel projectViewModel; diff --git a/lib/pages/medical/doctor/doctor_home_page.dart b/lib/pages/medical/doctor/doctor_home_page.dart index ebf32924..efd3529a 100644 --- a/lib/pages/medical/doctor/doctor_home_page.dart +++ b/lib/pages/medical/doctor/doctor_home_page.dart @@ -12,7 +12,7 @@ import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; class DoctorHomePage extends StatelessWidget { - List imagesInfo = List(); + List imagesInfo =[]; @override Widget build(BuildContext context) { imagesInfo diff --git a/lib/pages/medical/eye/EyeHomePage.dart b/lib/pages/medical/eye/EyeHomePage.dart index 901ce187..91dd91c8 100644 --- a/lib/pages/medical/eye/EyeHomePage.dart +++ b/lib/pages/medical/eye/EyeHomePage.dart @@ -35,7 +35,7 @@ class EyeHomePage extends StatefulWidget { class _EyeHomePageState extends State with SingleTickerProviderStateMixin { TabController _tabController; - List doctorDetailsList = List(); + List doctorDetailsList =[]; @override void initState() { diff --git a/lib/pages/medical/labs/labs_home_page.dart b/lib/pages/medical/labs/labs_home_page.dart index 26738778..d1db6b28 100644 --- a/lib/pages/medical/labs/labs_home_page.dart +++ b/lib/pages/medical/labs/labs_home_page.dart @@ -17,7 +17,7 @@ import 'package:provider/provider.dart'; import 'laboratory_result_page.dart'; class LabsHomePage extends StatelessWidget { - List imagesInfo = List(); + List imagesInfo =[]; @override Widget build(BuildContext context) { diff --git a/lib/pages/medical/medical_profile_page_new.dart b/lib/pages/medical/medical_profile_page_new.dart index 35f6cd45..ba756759 100644 --- a/lib/pages/medical/medical_profile_page_new.dart +++ b/lib/pages/medical/medical_profile_page_new.dart @@ -22,7 +22,7 @@ class MedicalProfilePageNew extends StatefulWidget { class _MedicalProfilePageState extends State { var authProvider = new AuthProvider(); - List medical = List(); + List medical =[]; ProjectViewModel projectViewModel; @override diff --git a/lib/pages/medical/my_invoices/invoice_detail_page.dart b/lib/pages/medical/my_invoices/invoice_detail_page.dart index b928e0f8..434aa71c 100644 --- a/lib/pages/medical/my_invoices/invoice_detail_page.dart +++ b/lib/pages/medical/my_invoices/invoice_detail_page.dart @@ -222,7 +222,7 @@ class _InvoiceDetailState extends State { subTotal = 0; grandTotal = 0; - List listConsultations = new List(); + List listConsultations = new[]; widget.dentalInvoiceDetailResponse.listEInvoiceForDental[0].listConsultation.forEach((item) { var i = listConsultations.indexWhere((x) => x.procedureID == item.procedureID); diff --git a/lib/pages/medical/my_invoices/my_invoice_page.dart b/lib/pages/medical/my_invoices/my_invoice_page.dart index a39f9d8f..2f425624 100644 --- a/lib/pages/medical/my_invoices/my_invoice_page.dart +++ b/lib/pages/medical/my_invoices/my_invoice_page.dart @@ -26,7 +26,7 @@ class _MyInvoicesState extends State { DentalInvoiceDetailResponse dentalInvoiceDetailResponse; ProjectViewModel projectViewModel; - List imagesInfo = List(); + List imagesInfo =[]; @override void initState() { diff --git a/lib/pages/medical/my_trackers/widget/CurvedChartBloodPressure.dart b/lib/pages/medical/my_trackers/widget/CurvedChartBloodPressure.dart index 4e0fe4e6..fb349e3b 100644 --- a/lib/pages/medical/my_trackers/widget/CurvedChartBloodPressure.dart +++ b/lib/pages/medical/my_trackers/widget/CurvedChartBloodPressure.dart @@ -15,8 +15,8 @@ class CurvedChartBloodPressure extends StatelessWidget { CurvedChartBloodPressure({this.title, this.timeSeries1, this.indexes, this.timeSeries2, this.horizontalInterval = 20.0}); - List xAxixs = List(); - List yAxixs = List(); + List xAxixs =[]; + List yAxixs =[]; @override Widget build(BuildContext context) { @@ -214,12 +214,12 @@ class CurvedChartBloodPressure extends StatelessWidget { } List getData(context) { - List spots = List(); + List spots =[]; for (int index = 0; index < timeSeries1.length; index++) { spots.add(FlSpot(index.toDouble(), timeSeries1[index].sales)); } - List spots2 = List(); + List spots2 =[]; for (int index = 0; index < timeSeries2.length; index++) { spots2.add(FlSpot(index.toDouble(), timeSeries2[index].sales)); } diff --git a/lib/pages/medical/my_trackers/widget/LineChartCurved.dart b/lib/pages/medical/my_trackers/widget/LineChartCurved.dart index a49f7c80..288c96c6 100644 --- a/lib/pages/medical/my_trackers/widget/LineChartCurved.dart +++ b/lib/pages/medical/my_trackers/widget/LineChartCurved.dart @@ -12,8 +12,8 @@ class LineChartCurved extends StatelessWidget { LineChartCurved({this.title, this.timeSeries, this.indexes, this.horizontalInterval = 20.0}); - List xAxixs = List(); - List yAxixs = List(); + List xAxixs =[]; + List yAxixs =[]; @override Widget build(BuildContext context) { @@ -260,7 +260,7 @@ class LineChartCurved extends StatelessWidget { } List getData(context) { - List spots = List(); + List spots =[]; for (int index = 0; index < timeSeries.length; index++) { spots.add(FlSpot(index.toDouble(), timeSeries[index].sales)); } diff --git a/lib/pages/medical/my_trackers/widget/MonthCurvedChartBloodPressure.dart b/lib/pages/medical/my_trackers/widget/MonthCurvedChartBloodPressure.dart index 8431dd0b..16501e2e 100644 --- a/lib/pages/medical/my_trackers/widget/MonthCurvedChartBloodPressure.dart +++ b/lib/pages/medical/my_trackers/widget/MonthCurvedChartBloodPressure.dart @@ -14,8 +14,8 @@ class MonthCurvedChartBloodPressure extends StatelessWidget { MonthCurvedChartBloodPressure({this.title, this.timeSeries1, this.indexes, this.timeSeries2, this.horizontalInterval = 20.0}); - List xAxixs = List(); - List yAxixs = List(); + List xAxixs =[]; + List yAxixs =[]; @override Widget build(BuildContext context) { @@ -211,12 +211,12 @@ class MonthCurvedChartBloodPressure extends StatelessWidget { } List getData(context) { - List spots = List(); + List spots =[]; for (int index = 0; index < timeSeries1.length; index++) { spots.add(FlSpot(index.toDouble(), timeSeries1[index].sales)); } - List spots2 = List(); + List spots2 =[]; for (int index = 0; index < timeSeries2.length; index++) { spots2.add(FlSpot(index.toDouble(), timeSeries2[index].sales)); } diff --git a/lib/pages/medical/my_trackers/widget/MonthLineChartCurved.dart b/lib/pages/medical/my_trackers/widget/MonthLineChartCurved.dart index 6192134c..3f469541 100644 --- a/lib/pages/medical/my_trackers/widget/MonthLineChartCurved.dart +++ b/lib/pages/medical/my_trackers/widget/MonthLineChartCurved.dart @@ -12,8 +12,8 @@ class MonthLineChartCurved extends StatelessWidget { MonthLineChartCurved({this.title, this.timeSeries, this.indexes, this.horizontalInterval = 15.0}); - List xAxixs = List(); - List yAxixs = List(); + List xAxixs =[]; + List yAxixs =[]; @override Widget build(BuildContext context) { @@ -181,7 +181,7 @@ class MonthLineChartCurved extends StatelessWidget { } List getData(context) { - List spots = List(); + List spots =[]; if (timeSeries.length == 0) { spots.add(FlSpot(0, 0)); } diff --git a/lib/pages/medical/patient_sick_leave_page.dart b/lib/pages/medical/patient_sick_leave_page.dart index 479b5fe6..f68fee85 100644 --- a/lib/pages/medical/patient_sick_leave_page.dart +++ b/lib/pages/medical/patient_sick_leave_page.dart @@ -25,7 +25,7 @@ class PatientSickLeavePage extends StatefulWidget { } class _PatientSickLeavePageState extends State { - List imagesInfo = List(); + List imagesInfo =[]; @override void initState() { diff --git a/lib/pages/medical/prescriptions/prescriptions_home_page.dart b/lib/pages/medical/prescriptions/prescriptions_home_page.dart index 4cb1e890..26aaa308 100644 --- a/lib/pages/medical/prescriptions/prescriptions_home_page.dart +++ b/lib/pages/medical/prescriptions/prescriptions_home_page.dart @@ -20,7 +20,7 @@ class HomePrescriptionsPage extends StatefulWidget { class _HomePrescriptionsPageState extends State with SingleTickerProviderStateMixin { TabController _tabController; - List imagesInfo = List(); + List imagesInfo =[]; ProjectViewModel projectViewModel; diff --git a/lib/pages/medical/radiology/radiology_home_page.dart b/lib/pages/medical/radiology/radiology_home_page.dart index 9fc49cb5..9b5ab3cd 100644 --- a/lib/pages/medical/radiology/radiology_home_page.dart +++ b/lib/pages/medical/radiology/radiology_home_page.dart @@ -17,7 +17,7 @@ import 'package:flutter/material.dart'; import 'package:provider/provider.dart'; class RadiologyHomePage extends StatelessWidget { - List imagesInfo = List(); + List imagesInfo =[]; @override Widget build(BuildContext context) { diff --git a/lib/pages/medical/reports/monthly_reports.dart b/lib/pages/medical/reports/monthly_reports.dart index 2a2647f7..2d2991ac 100644 --- a/lib/pages/medical/reports/monthly_reports.dart +++ b/lib/pages/medical/reports/monthly_reports.dart @@ -25,7 +25,7 @@ class _MonthlyReportsPageState extends State { String email; final formKey = GlobalKey(); - List imagesInfo = List(); + List imagesInfo =[]; @override void initState() { diff --git a/lib/pages/medical/reports/report_home_page.dart b/lib/pages/medical/reports/report_home_page.dart index 55d1b901..d607f67d 100644 --- a/lib/pages/medical/reports/report_home_page.dart +++ b/lib/pages/medical/reports/report_home_page.dart @@ -29,7 +29,7 @@ class HomeReportPage extends StatefulWidget { class _HomeReportPageState extends State with SingleTickerProviderStateMixin { TabController _tabController_new; - List imagesInfo = List(); + List imagesInfo =[]; int _currentPage = 0; @override diff --git a/lib/pages/medical/smart_watch_health_data/distance/distanceTracker.dart b/lib/pages/medical/smart_watch_health_data/distance/distanceTracker.dart index 02e69481..be099301 100644 --- a/lib/pages/medical/smart_watch_health_data/distance/distanceTracker.dart +++ b/lib/pages/medical/smart_watch_health_data/distance/distanceTracker.dart @@ -35,9 +35,9 @@ class _DistanceTrackerState extends State with SingleTickerProv int monthlyDataLength = 0; int yearlyDataLength = 0; - List weekyStepsList = List(); - List monthlyStepsList = List(); - List yearlyStepsList = List(); + List weekyStepsList =[]; + List monthlyStepsList =[]; + List yearlyStepsList =[]; List weeklyTimeSeriesData = []; List monthlyTimeSeriesData = []; diff --git a/lib/pages/medical/smart_watch_health_data/health_data_list.dart b/lib/pages/medical/smart_watch_health_data/health_data_list.dart index 48902ff0..84dd0d28 100644 --- a/lib/pages/medical/smart_watch_health_data/health_data_list.dart +++ b/lib/pages/medical/smart_watch_health_data/health_data_list.dart @@ -16,7 +16,7 @@ class HealthDataList extends StatefulWidget { } class _HealthDataListState extends State { - // List dataTypes = List(); + // List dataTypes =[]; @override void initState() { diff --git a/lib/pages/medical/smart_watch_health_data/heartrate/heartrateTracker.dart b/lib/pages/medical/smart_watch_health_data/heartrate/heartrateTracker.dart index 5d4b8e4a..373902a8 100644 --- a/lib/pages/medical/smart_watch_health_data/heartrate/heartrateTracker.dart +++ b/lib/pages/medical/smart_watch_health_data/heartrate/heartrateTracker.dart @@ -35,9 +35,9 @@ class _HeartRateTrackerState extends State with SingleTickerPr int monthlyDataLength = 0; int yearlyDataLength = 0; - List weekyHearRateList = List(); - List monthlyHearRateList = List(); - List yearlyHearRateList = List(); + List weekyHearRateList =[]; + List monthlyHearRateList =[]; + List yearlyHearRateList =[]; List weeklyTimeSeriesData = []; List monthlyTimeSeriesData = []; diff --git a/lib/pages/medical/smart_watch_health_data/steps/stepsTracker.dart b/lib/pages/medical/smart_watch_health_data/steps/stepsTracker.dart index 3832d799..aea6fe20 100644 --- a/lib/pages/medical/smart_watch_health_data/steps/stepsTracker.dart +++ b/lib/pages/medical/smart_watch_health_data/steps/stepsTracker.dart @@ -35,9 +35,9 @@ class _StepsTrackerState extends State with SingleTickerProviderSt int monthlyDataLength = 0; int yearlyDataLength = 0; - List weekyStepsList = List(); - List monthlyStepsList = List(); - List yearlyStepsList = List(); + List weekyStepsList =[]; + List monthlyStepsList =[]; + List yearlyStepsList =[]; List weeklyTimeSeriesData = []; List monthlyTimeSeriesData = []; diff --git a/lib/pages/medical/smart_watch_health_data/syncHealthData.dart b/lib/pages/medical/smart_watch_health_data/syncHealthData.dart index 38da7db3..28fdadba 100644 --- a/lib/pages/medical/smart_watch_health_data/syncHealthData.dart +++ b/lib/pages/medical/smart_watch_health_data/syncHealthData.dart @@ -23,12 +23,12 @@ class syncHealthDataButton extends StatefulWidget { class _syncHealthDataButtonState extends State { List _healthDataList = []; - List Med_InsertTransactionsInputsList = new List(); - List Med_InsertTransactionsInputsList2 = new List(); + List Med_InsertTransactionsInputsList = new[]; + List Med_InsertTransactionsInputsList2 = new[]; - List sleepDataList = new List(); + List sleepDataList = new[]; - List healthDataList = new List(); + List healthDataList = new[]; int TransactionsListID = 1; diff --git a/lib/pages/medical/vital_sign/LineChartCurved.dart b/lib/pages/medical/vital_sign/LineChartCurved.dart index 305d158e..0c675263 100644 --- a/lib/pages/medical/vital_sign/LineChartCurved.dart +++ b/lib/pages/medical/vital_sign/LineChartCurved.dart @@ -13,8 +13,8 @@ class LineChartCurved extends StatelessWidget { LineChartCurved({this.title, this.timeSeries, this.indexes, this.horizontalInterval = 20.0}); - List xAxixs = List(); - List yAxixs = List(); + List xAxixs =[]; + List yAxixs =[]; double minY = 0; double maxY = 0; @@ -231,7 +231,7 @@ class LineChartCurved extends StatelessWidget { } List getData(context) { - List spots = List(); + List spots =[]; for (int index = 0; index < timeSeries.length; index++) { spots.add(FlSpot(index.toDouble(), timeSeries[index].sales)); } diff --git a/lib/pages/medical/vital_sign/LineChartCurvedBloodPressure.dart b/lib/pages/medical/vital_sign/LineChartCurvedBloodPressure.dart index 967c98cc..ad001273 100644 --- a/lib/pages/medical/vital_sign/LineChartCurvedBloodPressure.dart +++ b/lib/pages/medical/vital_sign/LineChartCurvedBloodPressure.dart @@ -13,8 +13,8 @@ class LineChartCurvedBloodPressure extends StatelessWidget { LineChartCurvedBloodPressure({this.title, this.timeSeries1, this.indexes, this.timeSeries2}); - List xAxixs = List(); - List yAxixs = List(); + List xAxixs =[]; + List yAxixs =[]; @override Widget build(BuildContext context) { @@ -243,12 +243,12 @@ class LineChartCurvedBloodPressure extends StatelessWidget { } List getData(context) { - List spots = List(); + List spots =[]; for (int index = 0; index < timeSeries1.length; index++) { spots.add(FlSpot(index.toDouble(), timeSeries1[index].sales)); } - List spots2 = List(); + List spots2 =[]; for (int index = 0; index < timeSeries2.length; index++) { spots2.add(FlSpot(index.toDouble(), timeSeries2[index].sales)); } diff --git a/lib/pages/medical/vital_sign/vital_sign_details_screen.dart b/lib/pages/medical/vital_sign/vital_sign_details_screen.dart index b7da4fa2..c859c8b3 100644 --- a/lib/pages/medical/vital_sign/vital_sign_details_screen.dart +++ b/lib/pages/medical/vital_sign/vital_sign_details_screen.dart @@ -23,7 +23,7 @@ class VitalSignDetailsScreen extends StatelessWidget { VitalSignDetailsScreen({this.appointmentNo, this.projectID, this.isNotOneAppointment = true}); - List imagesInfo = List(); + List imagesInfo =[]; List vitalSigns = []; initList(BuildContext context, VitalSignViewModel mode) { diff --git a/lib/pages/parent_categorise_page.dart b/lib/pages/parent_categorise_page.dart index 87b3e53a..37b05404 100644 --- a/lib/pages/parent_categorise_page.dart +++ b/lib/pages/parent_categorise_page.dart @@ -63,8 +63,8 @@ class _ParentCategorisePageState extends State { int pageIndex = 1; - List entityList = List(); - List entityListBrands = List(); + List entityList =[]; + List entityListBrands =[]; RefreshController controller = RefreshController(); diff --git a/lib/pages/paymentService/payment_service.dart b/lib/pages/paymentService/payment_service.dart index 3c5cb01f..4745cf2e 100644 --- a/lib/pages/paymentService/payment_service.dart +++ b/lib/pages/paymentService/payment_service.dart @@ -56,7 +56,7 @@ class PaymentService extends StatelessWidget { } List getPaymentServiceList(BuildContext context) { - List medical = List(); + List medical =[]; medical.add( InkWell( diff --git a/lib/pages/pharmacies/screens/lacum-registration-page.dart b/lib/pages/pharmacies/screens/lacum-registration-page.dart index dc309c00..aacd60b1 100644 --- a/lib/pages/pharmacies/screens/lacum-registration-page.dart +++ b/lib/pages/pharmacies/screens/lacum-registration-page.dart @@ -27,7 +27,7 @@ class _LakumRegistrationPageState extends State { final TextEditingController _mobileNumberController = TextEditingController(); - List languages = List(); + List languages =[]; IdNamePair selectedLanguage; diff --git a/lib/pages/sub_categorise_page.dart b/lib/pages/sub_categorise_page.dart index 94afac3b..c1542331 100644 --- a/lib/pages/sub_categorise_page.dart +++ b/lib/pages/sub_categorise_page.dart @@ -63,8 +63,8 @@ class _SubCategorisePageState extends State { int pageIndex = 1; RefreshController controller = RefreshController(); - List entityList = List(); - List entityListBrands = List(); + List entityList =[]; + List entityListBrands =[]; @override Widget build(BuildContext context) { diff --git a/lib/services/pharmacy_services/brands_service.dart b/lib/services/pharmacy_services/brands_service.dart index 32024f2f..6a010bd6 100644 --- a/lib/services/pharmacy_services/brands_service.dart +++ b/lib/services/pharmacy_services/brands_service.dart @@ -8,13 +8,13 @@ class BrandsService extends BaseService { AppSharedPreferences sharedPref = AppSharedPreferences(); bool isLogin = false; - List _brandsList = List(); + List _brandsList =[]; List get brandsList => _brandsList; - List _topBrandsList = List(); + List _topBrandsList =[]; List get topBrandsList => _topBrandsList; - List _searchList = List(); + List _searchList =[]; List get searchList => _searchList; clearSearchList() { diff --git a/lib/services/pharmacy_services/cancelOrder_service.dart b/lib/services/pharmacy_services/cancelOrder_service.dart index 80be905b..0500a45b 100644 --- a/lib/services/pharmacy_services/cancelOrder_service.dart +++ b/lib/services/pharmacy_services/cancelOrder_service.dart @@ -15,7 +15,7 @@ class CancelOrderService extends BaseService{ AuthenticatedUser authUser = new AuthenticatedUser(); AuthProvider authProvider = new AuthProvider(); - List _cancelOrderList = List(); + List _cancelOrderList =[]; List get cancelOrderList => _cancelOrderList; String url =""; diff --git a/lib/services/pharmacy_services/orderDetails_service.dart b/lib/services/pharmacy_services/orderDetails_service.dart index 49506bfb..f1f99e5b 100644 --- a/lib/services/pharmacy_services/orderDetails_service.dart +++ b/lib/services/pharmacy_services/orderDetails_service.dart @@ -16,7 +16,7 @@ class OrderDetailsService extends BaseService{ AuthenticatedUser authUser = new AuthenticatedUser(); AuthProvider authProvider = new AuthProvider(); - List _orderList = List(); + List _orderList =[]; List get orderList => _orderList; diff --git a/lib/services/pharmacy_services/order_service.dart b/lib/services/pharmacy_services/order_service.dart index ed2391d8..9a2a15c7 100644 --- a/lib/services/pharmacy_services/order_service.dart +++ b/lib/services/pharmacy_services/order_service.dart @@ -11,7 +11,7 @@ class OrderService extends BaseService { AuthenticatedUser authUser = new AuthenticatedUser(); AuthProvider authProvider = new AuthProvider(); - List _orderList = List(); + List _orderList =[]; List get orderList => _orderList; String url = ""; diff --git a/lib/services/pharmacy_services/pharmacyAddress_service.dart b/lib/services/pharmacy_services/pharmacyAddress_service.dart index 4ed6ce3f..f02ce3db 100644 --- a/lib/services/pharmacy_services/pharmacyAddress_service.dart +++ b/lib/services/pharmacy_services/pharmacyAddress_service.dart @@ -9,7 +9,7 @@ import 'package:diplomaticquarterapp/core/service/base_service.dart'; import 'package:diplomaticquarterapp/services/authentication/auth_provider.dart'; class PharmacyAddressService extends BaseService { - List addresses = List(); + List addresses =[]; CountryData country; int selectedAddressIndex = 0; diff --git a/lib/services/pharmacy_services/product_detail_service.dart b/lib/services/pharmacy_services/product_detail_service.dart index 97156e4c..e4de60db 100644 --- a/lib/services/pharmacy_services/product_detail_service.dart +++ b/lib/services/pharmacy_services/product_detail_service.dart @@ -26,23 +26,23 @@ class ProductDetailService extends BaseService { bool get isStockAvailable => _isStockAvailable; - List _productDetailList = List(); + List _productDetailList =[]; List get productDetailList => _productDetailList; - List _productLocationList = List(); + List _productLocationList =[]; List get productLocationList => _productLocationList; - List _addToCartModel = List(); + List _addToCartModel =[]; List get addToCartModel => _addToCartModel; - List _wishListProducts = List(); + List _wishListProducts =[]; List get wishListProducts => _wishListProducts; - List _productSpecification = List(); + List _productSpecification =[]; List get productSpecification => _productSpecification; diff --git a/lib/services/pharmacy_services/recommendedProduct_service.dart b/lib/services/pharmacy_services/recommendedProduct_service.dart index 7e09bbfa..4b45b6d8 100644 --- a/lib/services/pharmacy_services/recommendedProduct_service.dart +++ b/lib/services/pharmacy_services/recommendedProduct_service.dart @@ -15,10 +15,10 @@ class RecommendedProductService extends BaseService{ AuthenticatedUser authUser = new AuthenticatedUser(); AuthProvider authProvider = new AuthProvider(); -// List> _recommendedProductList = List(); +// List> _recommendedProductList =[]; // List> get recommendedList => _recommendedProductList; - List _recommendedProductList = List(); + List _recommendedProductList =[]; List get recommendedList => _recommendedProductList; Future getRecommendedProducts(productId) async { diff --git a/lib/services/pharmacy_services/review_service.dart b/lib/services/pharmacy_services/review_service.dart index b60ad412..43d5b8d5 100644 --- a/lib/services/pharmacy_services/review_service.dart +++ b/lib/services/pharmacy_services/review_service.dart @@ -14,7 +14,7 @@ class ReviewService extends BaseService { AuthProvider authProvider = new AuthProvider(); bool isLogin = false; - List _reviewList = List(); + List _reviewList =[]; List get reviewList => _reviewList; diff --git a/lib/services/pharmacy_services/wishList_service.dart b/lib/services/pharmacy_services/wishList_service.dart index ab347307..64db972b 100644 --- a/lib/services/pharmacy_services/wishList_service.dart +++ b/lib/services/pharmacy_services/wishList_service.dart @@ -7,7 +7,7 @@ import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; class WishListService extends BaseService { AppSharedPreferences sharedPref = AppSharedPreferences(); bool isLogin = false; - List _wishListProducts = List(); + List _wishListProducts =[]; List get wishListProducts => _wishListProducts; diff --git a/lib/services/pharmacy_services/writeReview_service.dart b/lib/services/pharmacy_services/writeReview_service.dart index 52d31c9b..97495e99 100644 --- a/lib/services/pharmacy_services/writeReview_service.dart +++ b/lib/services/pharmacy_services/writeReview_service.dart @@ -18,7 +18,7 @@ class writeReviewService extends BaseService{ AuthProvider authProvider = new AuthProvider(); List get writeReview => writeReview; - List _writeReviewList = List(); + List _writeReviewList =[]; List get orderList => _writeReviewList; diff --git a/lib/uitl/CalendarUtils.dart b/lib/uitl/CalendarUtils.dart index 75af015c..4cf55a86 100644 --- a/lib/uitl/CalendarUtils.dart +++ b/lib/uitl/CalendarUtils.dart @@ -31,7 +31,7 @@ class CalendarUtils { } Future createOrUpdateEvents({List scheduleList, String title, String description, List scheduleDateTime, List daysOfWeek}) async { - List events = List(); + List events =[]; scheduleDateTime.forEach((element) { RecurrenceRule recurrenceRule = RecurrenceRule( RecurrenceFrequency.Daily, diff --git a/lib/uitl/HMG_Geofence.dart b/lib/uitl/HMG_Geofence.dart index 751c4ba6..d45c609a 100644 --- a/lib/uitl/HMG_Geofence.dart +++ b/lib/uitl/HMG_Geofence.dart @@ -27,7 +27,7 @@ // final AndroidGeofencingSettings androidSettings = AndroidGeofencingSettings(initialTrigger: [GeofenceEvent.enter, GeofenceEvent.exit, GeofenceEvent.dwell], loiteringDelay: 1000 * 60); // // final BuildContext context; -// final List triggers = List(); +// final List triggers =[]; // // HMG_Geofencing(this.context) { // triggers.add(GeofenceEvent.enter); @@ -61,7 +61,7 @@ // } // // void _saveZones() { -// var list = List(); +// var list =[]; // _zones.forEach((element) { // list.add(element.toJson()); // }); diff --git a/lib/uitl/utils.dart b/lib/uitl/utils.dart index 75b11879..d02f6120 100644 --- a/lib/uitl/utils.dart +++ b/lib/uitl/utils.dart @@ -220,7 +220,7 @@ class Utils { } static List myMedicalList({ProjectViewModel projectViewModel, BuildContext context, bool isLogin, count}) { - List medical = List(); + List medical =[]; medical.add(InkWell( onTap: () => projectViewModel.havePrivilege(5) ? Navigator.push(context, FadePage(page: MyAppointments())) : null, @@ -597,7 +597,7 @@ class Utils { } static List myMedicalListHomePage({ProjectViewModel projectViewModel, BuildContext context, bool isLogin, count}) { - List medical = List(); + List medical =[]; medical.add(InkWell( onTap: () => projectViewModel.havePrivilege(5) ? Navigator.push(context, FadePage(page: MyAppointments())) : null,