From 2a4059fd661d07ace85ff672c9be393bc45a0236 Mon Sep 17 00:00:00 2001 From: devamirsaleemahmad Date: Wed, 18 Oct 2023 09:58:57 +0300 Subject: [PATCH] models updates -> 3.13.6 --- .../insurance/Insurance_card_details.dart | 72 ++++++++--------- .../ReauestInsuranceApprovalModel.dart | 32 ++++---- .../insuranceManualUpdateRequest.dart | 28 +++---- lib/core/model/insurance/insurance_card.dart | 79 +++++++++---------- .../insurance_card_update_model.dart | 28 +++---- lib/core/model/labs/LabOrderResult.dart | 30 +++---- lib/core/model/labs/lab_result.dart | 46 +++++------ lib/core/model/labs/patient_lab_orders.dart | 72 ++++++++--------- .../labs/patient_lab_special_result.dart | 8 +- .../labs/request_patient_lab_orders.dart | 26 +++--- .../request_patient_lab_special_result.dart | 38 ++++----- .../labs/request_send_lab_report_email.dart | 58 +++++++------- lib/core/model/my_balance/AdvanceModel.dart | 20 ++--- .../patient_advance_balance_amount.dart | 6 +- lib/core/model/my_balance/patient_info.dart | 10 +-- .../patient_info_and_mobile_number.dart | 50 ++++++------ .../tamara_installment_details.dart | 56 +++++-------- .../blood_pressur/BloodPressureResult.dart | 22 +++--- .../MonthBloodPressureResultAverage.dart | 6 +- .../WeekBloodPressureResultAverage.dart | 6 +- .../YearBloodPressureResultAverage.dart | 12 +-- .../blood_sugar/DiabtecPatientResult.dart | 22 +++--- .../MonthDiabtectResultAverage.dart | 2 +- .../WeekDiabtectResultAverage.dart | 4 +- .../blood_sugar/YearDiabtecResultAverage.dart | 8 +- .../my_trakers/chartData/WeekChartDate.dart | 2 +- .../MonthWeightMeasurementResultAverage.dart | 2 +- .../WeekWeightMeasurementResultAverage.dart | 2 +- .../weight/WeightMeasurementResult.dart | 16 ++-- .../YearWeightMeasurementResultAverage.dart | 10 +-- .../get_notifications_request_model.dart | 6 +- .../get_notifications_response_model.dart | 40 +++++----- .../mark_message_as_read_request_model.dart | 2 +- .../AddProductToCartRequestModel.dart | 10 +-- .../requests/CreateCustomerRequestModel.dart | 14 ++-- .../OffersCategoriesRequestModel.dart | 10 +-- .../requests/OffersProductsRequestModel.dart | 14 ++-- .../offers_stores_response_model.dart | 12 +-- 38 files changed, 432 insertions(+), 449 deletions(-) diff --git a/lib/core/model/insurance/Insurance_card_details.dart b/lib/core/model/insurance/Insurance_card_details.dart index ddc33b2e..c9287a2a 100644 --- a/lib/core/model/insurance/Insurance_card_details.dart +++ b/lib/core/model/insurance/Insurance_card_details.dart @@ -1,44 +1,44 @@ class InsuranceCardDetailsModel { - int approvalLimit; - int companyGroupID; - String companyName; - String companyRemarks; - String dOB; - int deductible; - String effectiveFrom; - String effectiveTo; - String eligabilityFailureReason; - bool isMemberEligible; - String memberID; - String memberName; - String memberStatus; + int? approvalLimit; + int? companyGroupID; + String? companyName; + String? companyRemarks; + String? dOB; + int? deductible; + String? effectiveFrom; + String? effectiveTo; + String? eligabilityFailureReason; + bool? isMemberEligible; + String? memberID; + String? memberName; + String? memberStatus; dynamic message; - String nationalId; - String policyNumber; - String responseMessage; - String room; - String subCategory; + String? nationalId; + String? policyNumber; + String? responseMessage; + String? room; + String? subCategory; InsuranceCardDetailsModel( {this.approvalLimit, - this.companyGroupID, - this.companyName, - this.companyRemarks, - this.dOB, - this.deductible, - this.effectiveFrom, - this.effectiveTo, - this.eligabilityFailureReason, - this.isMemberEligible, - this.memberID, - this.memberName, - this.memberStatus, - this.message, - this.nationalId, - this.policyNumber, - this.responseMessage, - this.room, - this.subCategory}); + this.companyGroupID, + this.companyName, + this.companyRemarks, + this.dOB, + this.deductible, + this.effectiveFrom, + this.effectiveTo, + this.eligabilityFailureReason, + this.isMemberEligible, + this.memberID, + this.memberName, + this.memberStatus, + this.message, + this.nationalId, + this.policyNumber, + this.responseMessage, + this.room, + this.subCategory}); InsuranceCardDetailsModel.fromJson(Map json) { approvalLimit = json['ApprovalLimit']; diff --git a/lib/core/model/insurance/ReauestInsuranceApprovalModel.dart b/lib/core/model/insurance/ReauestInsuranceApprovalModel.dart index 3fa91ecf..6f154022 100644 --- a/lib/core/model/insurance/ReauestInsuranceApprovalModel.dart +++ b/lib/core/model/insurance/ReauestInsuranceApprovalModel.dart @@ -1,20 +1,20 @@ class RequestInsuranceApprovalModel { - 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 eXuldAPPNO; - int projectID; - int appointmentNo; + 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? eXuldAPPNO; + int? projectID; + int? appointmentNo; RequestInsuranceApprovalModel( {this.versionID, diff --git a/lib/core/model/insurance/insuranceManualUpdateRequest.dart b/lib/core/model/insurance/insuranceManualUpdateRequest.dart index 5eb8ebb9..5c1f17df 100644 --- a/lib/core/model/insurance/insuranceManualUpdateRequest.dart +++ b/lib/core/model/insurance/insuranceManualUpdateRequest.dart @@ -1,18 +1,18 @@ class InsuranceManualUpdateRequest { - String setupID; - String patientIdentificationID; - int projectID; - String mobileNo; - int activityId; - String component; - bool enableLogging; - String insuranceCompanyName; - String cardHolderName; - String memberShipNo; - String policyNo; - String schemeClass; - int requestType; - int patientID; + String? setupID; + String? patientIdentificationID; + int? projectID; + String? mobileNo; + int? activityId; + String? component; + bool? enableLogging; + String? insuranceCompanyName; + String? cardHolderName; + String? memberShipNo; + String? policyNo; + String? schemeClass; + int? requestType; + int? patientID; InsuranceManualUpdateRequest( {this.setupID, diff --git a/lib/core/model/insurance/insurance_card.dart b/lib/core/model/insurance/insurance_card.dart index e8395c95..364a7269 100644 --- a/lib/core/model/insurance/insurance_card.dart +++ b/lib/core/model/insurance/insurance_card.dart @@ -1,5 +1,3 @@ - - class InsuranceCardModel { double? versionID; int? channel; @@ -8,46 +6,45 @@ class InsuranceCardModel { String? generalid; int? patientOutSA; String? sessionID; - bool isDentalAllowedBackend; - int deviceTypeID; - int patientID; - String tokenID; - int patientTypeID; - int patientType; - String groupName; - String companyName; - int companyID; - String subCategoryDesc; - int subCategoryID; - String patientCardID; - String insurancePolicyNumber; - bool isActive; - String cardValidTo; + bool? isDentalAllowedBackend; + int? deviceTypeID; + int? patientID; + String? tokenID; + int? patientTypeID; + int? patientType; + String? groupName; + String? companyName; + int? companyID; + String? subCategoryDesc; + int? subCategoryID; + String? patientCardID; + String? insurancePolicyNumber; + bool? isActive; + String? cardValidTo; - InsuranceCardModel({ - this.insurancePolicyNumber, - this.subCategoryDesc, - this.subCategoryID, - 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.groupName, - this.companyName, - this.companyID, - this.patientCardID, - this.isActive, - this.cardValidTo - }); + InsuranceCardModel( + {this.insurancePolicyNumber, + this.subCategoryDesc, + this.subCategoryID, + 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.groupName, + this.companyName, + this.companyID, + this.patientCardID, + this.isActive, + this.cardValidTo}); InsuranceCardModel.fromJson(Map json) { isActive = json['IsActive']; diff --git a/lib/core/model/insurance/insurance_card_update_model.dart b/lib/core/model/insurance/insurance_card_update_model.dart index 52bd8ad7..d14f65bd 100644 --- a/lib/core/model/insurance/insurance_card_update_model.dart +++ b/lib/core/model/insurance/insurance_card_update_model.dart @@ -1,20 +1,20 @@ class InsuranceUpdateModel { - int patientID; - int patientType; - double versionID; - int channel; - int languageID; - String iPAdress; - String generalid; - int patientOutSA; - String sessionID; - bool isDentalAllowedBackend; - int deviceTypeID; - String createdOn; - String statusDescription; - int appointmentNo; + int? patientID; + int? patientType; + double? versionID; + int? channel; + int? languageID; + String? iPAdress; + String? generalid; + int? patientOutSA; + String? sessionID; + bool? isDentalAllowedBackend; + int? deviceTypeID; + String? createdOn; + String? statusDescription; + int? appointmentNo; InsuranceUpdateModel( {this.patientID, diff --git a/lib/core/model/labs/LabOrderResult.dart b/lib/core/model/labs/LabOrderResult.dart index ecb4ae65..d282c6b4 100644 --- a/lib/core/model/labs/LabOrderResult.dart +++ b/lib/core/model/labs/LabOrderResult.dart @@ -1,23 +1,23 @@ class LabOrderResult { - String description; + String? description; dynamic femaleInterpretativeData; - int gender; - int lineItemNo; + int? gender; + int? lineItemNo; dynamic maleInterpretativeData; dynamic notes; - String packageID; - int patientID; - String projectID; - String referanceRange; - String resultValue; - String sampleCollectedOn; - String sampleReceivedOn; - String setupID; + String? packageID; + int? patientID; + String? projectID; + String? referanceRange; + String? resultValue; + String? sampleCollectedOn; + String? sampleReceivedOn; + String? setupID; dynamic superVerifiedOn; - String testCode; - String uOM; - String verifiedOn; - String verifiedOnDateTime; + String? testCode; + String? uOM; + String? verifiedOn; + String? verifiedOnDateTime; LabOrderResult( {this.description, diff --git a/lib/core/model/labs/lab_result.dart b/lib/core/model/labs/lab_result.dart index e6c78bf2..3de55ff1 100644 --- a/lib/core/model/labs/lab_result.dart +++ b/lib/core/model/labs/lab_result.dart @@ -1,36 +1,36 @@ class LabResultList { - String filterName = ""; - List patientLabResultList = []; + String? filterName = ""; + List? patientLabResultList = []; - LabResultList({this.filterName, LabResult lab}) { - patientLabResultList.add(lab); + LabResultList({this.filterName, LabResult? lab}) { + patientLabResultList!.add(lab!); } } class LabResult { - String description; + String? description; dynamic femaleInterpretativeData; - int gender; - bool isCertificateAllowed; - int lineItemNo; + int? gender; + bool? isCertificateAllowed; + int? lineItemNo; dynamic maleInterpretativeData; dynamic notes; - int orderLineItemNo; - int orderNo; - String packageID; - int patientID; - String projectID; - String referanceRange; - String resultValue; - int resultValueBasedLineItemNo; - String resultValueFlag; - String sampleCollectedOn; - String sampleReceivedOn; - String setupID; + int? orderLineItemNo; + int? orderNo; + String? packageID; + int? patientID; + String? projectID; + String? referanceRange; + String? resultValue; + int? resultValueBasedLineItemNo; + String? resultValueFlag; + String? sampleCollectedOn; + String? sampleReceivedOn; + String? setupID; dynamic superVerifiedOn; - String testCode; - String uOM; - String verifiedOn; + String? testCode; + String? uOM; + String? verifiedOn; dynamic verifiedOnDateTime; LabResult( diff --git a/lib/core/model/labs/patient_lab_orders.dart b/lib/core/model/labs/patient_lab_orders.dart index c2908023..2dc69ef6 100644 --- a/lib/core/model/labs/patient_lab_orders.dart +++ b/lib/core/model/labs/patient_lab_orders.dart @@ -1,41 +1,41 @@ import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; class PatientLabOrders { - int actualDoctorRate; - String clinicDescription; - String clinicDescriptionEnglish; + int? actualDoctorRate; + String? clinicDescription; + String? clinicDescriptionEnglish; Null clinicDescriptionN; - int clinicID; - int doctorID; - String doctorImageURL; - String doctorName; - String doctorNameEnglish; + int? clinicID; + int? doctorID; + String? doctorImageURL; + String? doctorName; + String? doctorNameEnglish; Null doctorNameN; - int doctorRate; - String doctorTitle; - int gender; - String genderDescription; - String invoiceNo; - String invoiceNo_VP; - bool isActiveDoctorProfile; - bool isDoctorAllowVedioCall; - bool isExecludeDoctor; - bool isInOutPatient; - String isInOutPatientDescription; - String isInOutPatientDescriptionN; - bool isRead; - String nationalityFlagURL; - int noOfPatientsRate; - DateTime orderDate; - String orderNo; - String patientID; - String projectID; - String projectName; + int? doctorRate; + String ?doctorTitle; + int? gender; + String? genderDescription; + String? invoiceNo; + String? invoiceNo_VP; + bool? isActiveDoctorProfile; + bool? isDoctorAllowVedioCall; + bool? isExecludeDoctor; + bool? isInOutPatient; + String? isInOutPatientDescription; + String? isInOutPatientDescriptionN; + bool? isRead; + String? nationalityFlagURL; + int? noOfPatientsRate; + DateTime? orderDate; + String? orderNo; + String? patientID; + String? projectID; + String? projectName; Null projectNameN; - String qR; - String setupID; - List speciality; - bool isLiveCareAppointment; + String? qR; + String? setupID; + List? speciality; + bool? isLiveCareAppointment; PatientLabOrders( {this.actualDoctorRate, this.clinicDescription, @@ -152,11 +152,11 @@ class PatientLabOrders { } class PatientLabOrdersList { - String filterName = ""; - List patientLabOrdersList = List(); + String? filterName = ""; + List patientLabOrdersList = []; PatientLabOrdersList( - {this.filterName, PatientLabOrders patientDoctorAppointment}) { - patientLabOrdersList.add(patientDoctorAppointment); + {this.filterName, PatientLabOrders? patientDoctorAppointment}) { + patientLabOrdersList.add(patientDoctorAppointment!); } } diff --git a/lib/core/model/labs/patient_lab_special_result.dart b/lib/core/model/labs/patient_lab_special_result.dart index 8e24a04d..87301f94 100644 --- a/lib/core/model/labs/patient_lab_special_result.dart +++ b/lib/core/model/labs/patient_lab_special_result.dart @@ -1,8 +1,8 @@ class PatientLabSpecialResult { - String invoiceNo; - String moduleID; - String resultData; - String resultDataHTML; + String? invoiceNo; + String? moduleID; + String? resultData; + String? resultDataHTML; dynamic resultDataTxt; PatientLabSpecialResult( diff --git a/lib/core/model/labs/request_patient_lab_orders.dart b/lib/core/model/labs/request_patient_lab_orders.dart index ce9263ef..9f9dd4d3 100644 --- a/lib/core/model/labs/request_patient_lab_orders.dart +++ b/lib/core/model/labs/request_patient_lab_orders.dart @@ -1,17 +1,17 @@ class RequestPatientLabOrders { - 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; RequestPatientLabOrders( {this.versionID, diff --git a/lib/core/model/labs/request_patient_lab_special_result.dart b/lib/core/model/labs/request_patient_lab_special_result.dart index b3794e3c..6cfd8ef6 100644 --- a/lib/core/model/labs/request_patient_lab_special_result.dart +++ b/lib/core/model/labs/request_patient_lab_special_result.dart @@ -1,23 +1,23 @@ class RequestPatientLabSpecialResult { - String invoiceNo; - String invoiceNoVP; - String orderNo; - String setupID; - String projectID; - int clinicID; - 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? invoiceNo; + String? invoiceNoVP; + String? orderNo; + String? setupID; + String? projectID; + int? clinicID; + 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; RequestPatientLabSpecialResult( {this.invoiceNo, diff --git a/lib/core/model/labs/request_send_lab_report_email.dart b/lib/core/model/labs/request_send_lab_report_email.dart index 2188c500..440c4101 100644 --- a/lib/core/model/labs/request_send_lab_report_email.dart +++ b/lib/core/model/labs/request_send_lab_report_email.dart @@ -1,33 +1,33 @@ class RequestSendLabReportEmail { - 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 projectName; - String clinicName; - String doctorName; - String projectID; - String invoiceNo; - String invoiceNoVP; - String orderDate; - String orderNo; - bool isDownload; - int doctorID; + 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? projectName; + String? clinicName; + String? doctorName; + String? projectID; + String? invoiceNo; + String? invoiceNoVP; + String? orderDate; + String? orderNo; + bool? isDownload; + int? doctorID; RequestSendLabReportEmail( {this.versionID, diff --git a/lib/core/model/my_balance/AdvanceModel.dart b/lib/core/model/my_balance/AdvanceModel.dart index d2792990..a186f9f6 100644 --- a/lib/core/model/my_balance/AdvanceModel.dart +++ b/lib/core/model/my_balance/AdvanceModel.dart @@ -2,16 +2,16 @@ import 'package:diplomaticquarterapp/core/model/blooddonation/get_all_cities.dar import 'package:diplomaticquarterapp/core/model/hospitals/hospitals_model.dart'; class AdvanceModel { - String fileNumber; - String amount; - HospitalsModel hospitalsModel; - String email; - String note; - String depositorName; - String mobileNumber; - String patientName; - int projectID; - CitiesModel citiessModel; + String? fileNumber; + String? amount; + HospitalsModel? hospitalsModel; + String? email; + String? note; + String? depositorName; + String? mobileNumber; + String? patientName; + int? projectID; + CitiesModel? citiessModel; AdvanceModel( {this.amount, diff --git a/lib/core/model/my_balance/patient_advance_balance_amount.dart b/lib/core/model/my_balance/patient_advance_balance_amount.dart index bcceb3ff..3d8b133f 100644 --- a/lib/core/model/my_balance/patient_advance_balance_amount.dart +++ b/lib/core/model/my_balance/patient_advance_balance_amount.dart @@ -1,8 +1,8 @@ class PatientAdvanceBalanceAmount { - num distanceInKilometers; + num? distanceInKilometers; dynamic patientAdvanceBalanceAmount; - String projectDescription; - int projectID; + String? projectDescription; + int? projectID; PatientAdvanceBalanceAmount( {this.distanceInKilometers, diff --git a/lib/core/model/my_balance/patient_info.dart b/lib/core/model/my_balance/patient_info.dart index 6004f014..0f307ec4 100644 --- a/lib/core/model/my_balance/patient_info.dart +++ b/lib/core/model/my_balance/patient_info.dart @@ -1,9 +1,9 @@ class PatientInfo { - String fullName; - String mobileNumber; - int patientID; - int projectID; - String zipCode; + String? fullName; + String? mobileNumber; + int? patientID; + int? projectID; + String? zipCode; PatientInfo( {this.fullName, diff --git a/lib/core/model/my_balance/patient_info_and_mobile_number.dart b/lib/core/model/my_balance/patient_info_and_mobile_number.dart index 8f05b4d9..a201c4eb 100644 --- a/lib/core/model/my_balance/patient_info_and_mobile_number.dart +++ b/lib/core/model/my_balance/patient_info_and_mobile_number.dart @@ -1,10 +1,10 @@ class PatientInfoAndMobileNumber { - String setupID; - int projectID; - int mainAccountID; - int patientType; - int patientID; - String firstName; + String? setupID; + int? projectID; + int? mainAccountID; + int? patientType; + int? patientID; + String? firstName; Null middleName; Null lastName; Null firstNameN; @@ -14,29 +14,29 @@ class PatientInfoAndMobileNumber { Null dateofBirth; Null dateofBirthN; Null nationalityID; - String mobileNumber; - String emailAddress; + String? mobileNumber; + String? emailAddress; Null zipCode; PatientInfoAndMobileNumber( {this.setupID, - this.projectID, - this.mainAccountID, - this.patientType, - this.patientID, - this.firstName, - this.middleName, - this.lastName, - this.firstNameN, - this.middleNameN, - this.lastNameN, - this.gender, - this.dateofBirth, - this.dateofBirthN, - this.nationalityID, - this.mobileNumber, - this.emailAddress, - this.zipCode}); + this.projectID, + this.mainAccountID, + this.patientType, + this.patientID, + this.firstName, + this.middleName, + this.lastName, + this.firstNameN, + this.middleNameN, + this.lastNameN, + this.gender, + this.dateofBirth, + this.dateofBirthN, + this.nationalityID, + this.mobileNumber, + this.emailAddress, + this.zipCode}); PatientInfoAndMobileNumber.fromJson(Map json) { setupID = json['SetupID']; diff --git a/lib/core/model/my_balance/tamara_installment_details.dart b/lib/core/model/my_balance/tamara_installment_details.dart index 33e331d7..891b9a86 100644 --- a/lib/core/model/my_balance/tamara_installment_details.dart +++ b/lib/core/model/my_balance/tamara_installment_details.dart @@ -1,30 +1,21 @@ class TamaraInstallmentDetails { - String name; - String description; - MinLimit minLimit; - MinLimit maxLimit; - List supportedInstalments; + String? name; + String? description; + MinLimit? minLimit; + MinLimit? maxLimit; + List? supportedInstalments; - TamaraInstallmentDetails( - {this.name, - this.description, - this.minLimit, - this.maxLimit, - this.supportedInstalments}); + TamaraInstallmentDetails({this.name, this.description, this.minLimit, this.maxLimit, this.supportedInstalments}); TamaraInstallmentDetails.fromJson(Map json) { name = json['name']; description = json['description']; - minLimit = json['minLimit'] != null - ? new MinLimit.fromJson(json['minLimit']) - : null; - maxLimit = json['maxLimit'] != null - ? new MinLimit.fromJson(json['maxLimit']) - : null; + minLimit = json['minLimit'] != null ? new MinLimit.fromJson(json['minLimit']) : null; + maxLimit = json['maxLimit'] != null ? new MinLimit.fromJson(json['maxLimit']) : null; if (json['supportedInstalments'] != null) { supportedInstalments = []; json['supportedInstalments'].forEach((v) { - supportedInstalments.add(new SupportedInstalments.fromJson(v)); + supportedInstalments!.add(new SupportedInstalments.fromJson(v)); }); } } @@ -34,22 +25,21 @@ class TamaraInstallmentDetails { data['name'] = this.name; data['description'] = this.description; if (this.minLimit != null) { - data['minLimit'] = this.minLimit.toJson(); + data['minLimit'] = this.minLimit!.toJson(); } if (this.maxLimit != null) { - data['maxLimit'] = this.maxLimit.toJson(); + data['maxLimit'] = this.maxLimit!.toJson(); } if (this.supportedInstalments != null) { - data['supportedInstalments'] = - this.supportedInstalments.map((v) => v.toJson()).toList(); + data['supportedInstalments'] = this.supportedInstalments!.map((v) => v.toJson()).toList(); } return data; } } class MinLimit { - String currency; - int amount; + String? currency; + int? amount; MinLimit({this.currency, this.amount}); @@ -67,30 +57,26 @@ class MinLimit { } class SupportedInstalments { - int instalments; - MinLimit minLimit; - MinLimit maxLimit; + int? instalments; + MinLimit? minLimit; + MinLimit? maxLimit; SupportedInstalments({this.instalments, this.minLimit, this.maxLimit}); SupportedInstalments.fromJson(Map json) { instalments = json['instalments']; - minLimit = json['minLimit'] != null - ? new MinLimit.fromJson(json['minLimit']) - : null; - maxLimit = json['maxLimit'] != null - ? new MinLimit.fromJson(json['maxLimit']) - : null; + minLimit = json['minLimit'] != null ? new MinLimit.fromJson(json['minLimit']) : null; + maxLimit = json['maxLimit'] != null ? new MinLimit.fromJson(json['maxLimit']) : null; } Map toJson() { final Map data = new Map(); data['instalments'] = this.instalments; if (this.minLimit != null) { - data['minLimit'] = this.minLimit.toJson(); + data['minLimit'] = this.minLimit!.toJson(); } if (this.maxLimit != null) { - data['maxLimit'] = this.maxLimit.toJson(); + data['maxLimit'] = this.maxLimit!.toJson(); } return data; } diff --git a/lib/core/model/my_trakers/blood_pressur/BloodPressureResult.dart b/lib/core/model/my_trakers/blood_pressur/BloodPressureResult.dart index 57f2cd54..1528c5f7 100644 --- a/lib/core/model/my_trakers/blood_pressur/BloodPressureResult.dart +++ b/lib/core/model/my_trakers/blood_pressur/BloodPressureResult.dart @@ -1,23 +1,23 @@ import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; class BloodPressureResult { - int patientID; - int lineItemNo; - DateTime bloodPressureDate; - int measuredArm; - int systolicePressure; - int diastolicPressure; + int? patientID; + int? lineItemNo; + DateTime? bloodPressureDate; + int? measuredArm; + int? systolicePressure; + int? diastolicPressure; dynamic remark; - bool isActive; - int chartYear; - String chartMonth; + bool? isActive; + int? chartYear; + String? chartMonth; dynamic yearSystolicePressureAverageResult; dynamic monthSystolicePressureResult; dynamic weekSystolicePressureResult; - int yearDiastolicPressureAverageResult; + int? yearDiastolicPressureAverageResult; dynamic monthDiastolicPressureResult; dynamic weekDiastolicPressureResult; - String measuredArmDesc; + String? measuredArmDesc; dynamic weekDesc; BloodPressureResult( diff --git a/lib/core/model/my_trakers/blood_pressur/MonthBloodPressureResultAverage.dart b/lib/core/model/my_trakers/blood_pressur/MonthBloodPressureResultAverage.dart index 5343119c..ea0061a1 100644 --- a/lib/core/model/my_trakers/blood_pressur/MonthBloodPressureResultAverage.dart +++ b/lib/core/model/my_trakers/blood_pressur/MonthBloodPressureResultAverage.dart @@ -7,9 +7,9 @@ class MonthBloodPressureResultAverage { dynamic weektwoDiastolicPressureAverageResult; dynamic weekoneSystolicePressureAverageResult; dynamic weekoneDiastolicPressureAverageResult; - String weekDesc; - int weekDiastolicPressureAverageResult; - int weekSystolicePressureAverageResult; + String? weekDesc; + int? weekDiastolicPressureAverageResult; + int? weekSystolicePressureAverageResult; MonthBloodPressureResultAverage( {this.weekfourSystolicePressureAverageResult, diff --git a/lib/core/model/my_trakers/blood_pressur/WeekBloodPressureResultAverage.dart b/lib/core/model/my_trakers/blood_pressur/WeekBloodPressureResultAverage.dart index b7f3fc80..b3fd4b7f 100644 --- a/lib/core/model/my_trakers/blood_pressur/WeekBloodPressureResultAverage.dart +++ b/lib/core/model/my_trakers/blood_pressur/WeekBloodPressureResultAverage.dart @@ -1,9 +1,9 @@ import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; class WeekBloodPressureResultAverage { - int dailySystolicePressureAverageResult; - int dailyDiastolicPressureAverageResult; - DateTime bloodPressureDate; + int? dailySystolicePressureAverageResult; + int? dailyDiastolicPressureAverageResult; + DateTime? bloodPressureDate; WeekBloodPressureResultAverage( {this.dailySystolicePressureAverageResult, diff --git a/lib/core/model/my_trakers/blood_pressur/YearBloodPressureResultAverage.dart b/lib/core/model/my_trakers/blood_pressur/YearBloodPressureResultAverage.dart index 095738d6..bd78d04c 100644 --- a/lib/core/model/my_trakers/blood_pressur/YearBloodPressureResultAverage.dart +++ b/lib/core/model/my_trakers/blood_pressur/YearBloodPressureResultAverage.dart @@ -1,12 +1,12 @@ import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; class YearBloodPressureResultAverage { - int monthSystolicePressureAverageResult; - int monthDiastolicPressureAverageResult; + int? monthSystolicePressureAverageResult; + int? monthDiastolicPressureAverageResult; dynamic monthNumber; - String monthName; - String yearName; - DateTime date; + String? monthName; + String? yearName; + DateTime? date; YearBloodPressureResultAverage( {this.monthSystolicePressureAverageResult, @@ -23,7 +23,7 @@ class YearBloodPressureResultAverage { monthNumber = json['monthNumber']; monthName = json['monthName']; yearName = json['yearName']; - date = DateUtil.getMonthDateTime(monthName,yearName); + date = DateUtil.getMonthDateTime(monthName!,yearName); } diff --git a/lib/core/model/my_trakers/blood_sugar/DiabtecPatientResult.dart b/lib/core/model/my_trakers/blood_sugar/DiabtecPatientResult.dart index 86263155..62decb02 100644 --- a/lib/core/model/my_trakers/blood_sugar/DiabtecPatientResult.dart +++ b/lib/core/model/my_trakers/blood_sugar/DiabtecPatientResult.dart @@ -1,26 +1,26 @@ import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; class DiabtecPatientResult { - String chartMonth; + String? chartMonth; var chartYear; - DateTime dateChart; + DateTime? dateChart; var description; var descriptionN; - int diabtecAvarage; - bool isActive; - int lineItemNo; + int? diabtecAvarage; + bool? isActive; + int? lineItemNo; var listMonth; var listWeek; - int measured; - String measuredDesc; + int? measured; + String? measuredDesc; var monthAverageResult; - int patientID; + int? patientID; var remark; var resultDesc; dynamic resultValue; - String unit; + String? unit; var weekAverageResult; - String weekDesc; + String? weekDesc; var yearAverageResult; DiabtecPatientResult( @@ -74,7 +74,7 @@ class DiabtecPatientResult { final Map data = new Map(); data['ChartMonth'] = this.chartMonth; data['ChartYear'] = this.chartYear; - data['DateChart'] = DateUtil.convertDateToString(this.dateChart); + data['DateChart'] = DateUtil.convertDateToString(this.dateChart!); data['Description'] = this.description; data['DescriptionN'] = this.descriptionN; data['DiabtecAvarage'] = this.diabtecAvarage; diff --git a/lib/core/model/my_trakers/blood_sugar/MonthDiabtectResultAverage.dart b/lib/core/model/my_trakers/blood_sugar/MonthDiabtectResultAverage.dart index 65522098..c52c08f3 100644 --- a/lib/core/model/my_trakers/blood_sugar/MonthDiabtectResultAverage.dart +++ b/lib/core/model/my_trakers/blood_sugar/MonthDiabtectResultAverage.dart @@ -4,7 +4,7 @@ class MonthDiabtectResultAverage { var weektwoAverageResult; var weekoneAverageResult; dynamic weekAverageResult; - String weekDesc; + String? weekDesc; MonthDiabtectResultAverage( {this.weekfourAverageResult, diff --git a/lib/core/model/my_trakers/blood_sugar/WeekDiabtectResultAverage.dart b/lib/core/model/my_trakers/blood_sugar/WeekDiabtectResultAverage.dart index 3b1a8d9c..4d7c7952 100644 --- a/lib/core/model/my_trakers/blood_sugar/WeekDiabtectResultAverage.dart +++ b/lib/core/model/my_trakers/blood_sugar/WeekDiabtectResultAverage.dart @@ -2,7 +2,7 @@ import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; class WeekDiabtectResultAverage { dynamic dailyAverageResult; - DateTime dateChart; + DateTime? dateChart; WeekDiabtectResultAverage({this.dailyAverageResult, this.dateChart}); @@ -14,7 +14,7 @@ class WeekDiabtectResultAverage { Map toJson() { final Map data = new Map(); data['DailyAverageResult'] = this.dailyAverageResult; - data['DateChart'] = DateUtil.convertDateToString(this.dateChart); + data['DateChart'] = DateUtil.convertDateToString(this.dateChart!); return data; } } diff --git a/lib/core/model/my_trakers/blood_sugar/YearDiabtecResultAverage.dart b/lib/core/model/my_trakers/blood_sugar/YearDiabtecResultAverage.dart index cfdec286..8521e011 100644 --- a/lib/core/model/my_trakers/blood_sugar/YearDiabtecResultAverage.dart +++ b/lib/core/model/my_trakers/blood_sugar/YearDiabtecResultAverage.dart @@ -3,9 +3,9 @@ import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; class YearDiabtecResultAverage { dynamic monthAverageResult; var monthNumber; - String monthName; - String yearName; - DateTime date; + String? monthName; + String? yearName; + DateTime? date; YearDiabtecResultAverage( {this.monthAverageResult, @@ -19,7 +19,7 @@ class YearDiabtecResultAverage { monthNumber = json['monthNumber']; monthName = json['monthName']; yearName = json['yearName']; - date = DateUtil.getMonthDateTime(monthName,yearName); + date = DateUtil.getMonthDateTime(monthName!,yearName); } catch (e) { print(e); } diff --git a/lib/core/model/my_trakers/chartData/WeekChartDate.dart b/lib/core/model/my_trakers/chartData/WeekChartDate.dart index d972265d..ae3a9f47 100644 --- a/lib/core/model/my_trakers/chartData/WeekChartDate.dart +++ b/lib/core/model/my_trakers/chartData/WeekChartDate.dart @@ -1,5 +1,5 @@ class WeekChartDate { - final DateTime x; + final DateTime? x; final dynamic y; WeekChartDate({this.x, this.y}); diff --git a/lib/core/model/my_trakers/weight/MonthWeightMeasurementResultAverage.dart b/lib/core/model/my_trakers/weight/MonthWeightMeasurementResultAverage.dart index 8165302d..0296399a 100644 --- a/lib/core/model/my_trakers/weight/MonthWeightMeasurementResultAverage.dart +++ b/lib/core/model/my_trakers/weight/MonthWeightMeasurementResultAverage.dart @@ -4,7 +4,7 @@ class MonthWeightMeasurementResultAverage { dynamic weektwoAverageResult; dynamic weekoneAverageResult; dynamic weekAverageResult; - String weekDesc; + String? weekDesc; MonthWeightMeasurementResultAverage( {this.weekfourAverageResult, diff --git a/lib/core/model/my_trakers/weight/WeekWeightMeasurementResultAverage.dart b/lib/core/model/my_trakers/weight/WeekWeightMeasurementResultAverage.dart index b7345ad7..1c3566a9 100644 --- a/lib/core/model/my_trakers/weight/WeekWeightMeasurementResultAverage.dart +++ b/lib/core/model/my_trakers/weight/WeekWeightMeasurementResultAverage.dart @@ -2,7 +2,7 @@ import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; class WeekWeightMeasurementResultAverage { dynamic dailyAverageResult; - DateTime weightDate; + DateTime? weightDate; WeekWeightMeasurementResultAverage( {this.dailyAverageResult, this.weightDate}); diff --git a/lib/core/model/my_trakers/weight/WeightMeasurementResult.dart b/lib/core/model/my_trakers/weight/WeightMeasurementResult.dart index 337e8662..7436eccc 100644 --- a/lib/core/model/my_trakers/weight/WeightMeasurementResult.dart +++ b/lib/core/model/my_trakers/weight/WeightMeasurementResult.dart @@ -1,17 +1,17 @@ import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; class WeightMeasurementResult { - int patientID; - int lineItemNo; - int weightMeasured; - DateTime weightDate; + int? patientID; + int? lineItemNo; + int? weightMeasured; + DateTime? weightDate; dynamic remark; - bool isActive; - int measured; + bool? isActive; + int? measured; dynamic unit; - int chartYear; + int? chartYear; dynamic chartMonth; - double yearAverageResult; + double? yearAverageResult; dynamic monthAverageResult; dynamic weekAverageResult; dynamic weekDesc; diff --git a/lib/core/model/my_trakers/weight/YearWeightMeasurementResultAverage.dart b/lib/core/model/my_trakers/weight/YearWeightMeasurementResultAverage.dart index c2e20cb9..a8d64423 100644 --- a/lib/core/model/my_trakers/weight/YearWeightMeasurementResultAverage.dart +++ b/lib/core/model/my_trakers/weight/YearWeightMeasurementResultAverage.dart @@ -2,10 +2,10 @@ import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; class YearWeightMeasurementResultAverage { dynamic monthAverageResult; - int monthNumber; - String monthName; - String yearName; - DateTime date; + int? monthNumber; + String? monthName; + String? yearName; + DateTime? date; YearWeightMeasurementResultAverage( {this.monthAverageResult, @@ -18,7 +18,7 @@ class YearWeightMeasurementResultAverage { monthNumber = json['monthNumber']; monthName = json['monthName']; yearName = json['yearName']; - date = DateUtil.getMonthDateTime(monthName,yearName); + date = DateUtil.getMonthDateTime(monthName!,yearName); } diff --git a/lib/core/model/notifications/get_notifications_request_model.dart b/lib/core/model/notifications/get_notifications_request_model.dart index 9659754a..1cf99092 100644 --- a/lib/core/model/notifications/get_notifications_request_model.dart +++ b/lib/core/model/notifications/get_notifications_request_model.dart @@ -1,7 +1,7 @@ class GetNotificationsRequestModel { - int notificationStatusID; - int pagingSize; - int currentPage; + int? notificationStatusID; + int? pagingSize; + int? currentPage; GetNotificationsRequestModel( {this.notificationStatusID, this.pagingSize, this.currentPage}); diff --git a/lib/core/model/notifications/get_notifications_response_model.dart b/lib/core/model/notifications/get_notifications_response_model.dart index 1f3bbc28..60b9c764 100644 --- a/lib/core/model/notifications/get_notifications_response_model.dart +++ b/lib/core/model/notifications/get_notifications_response_model.dart @@ -1,25 +1,25 @@ class GetNotificationsResponseModel { - int id; - int recordId; - int patientID; - bool projectOutSA; - String deviceType; - String deviceToken; - String message; - String messageType; - String messageTypeData; + int? id; + int? recordId; + int? patientID; + bool? projectOutSA; + String? deviceType; + String? deviceToken; + String? message; + String? messageType; + String? messageTypeData; dynamic videoURL; - bool isQueue; - String isQueueOn; - String createdOn; - String createdBy; - String notificationType; - bool isSent; - String isSentOn; - bool isRead; - String isReadOn; - int channelID; - int projectID; + bool? isQueue; + String? isQueueOn; + String? createdOn; + String? createdBy; + String? notificationType; + bool? isSent; + String? isSentOn; + bool? isRead; + String? isReadOn; + int? channelID; + int? projectID; GetNotificationsResponseModel( {this.id, diff --git a/lib/core/model/notifications/mark_message_as_read_request_model.dart b/lib/core/model/notifications/mark_message_as_read_request_model.dart index 99dab006..9bf84bbe 100644 --- a/lib/core/model/notifications/mark_message_as_read_request_model.dart +++ b/lib/core/model/notifications/mark_message_as_read_request_model.dart @@ -1,5 +1,5 @@ class MarkMessageAsReadRequestModel { - int notificationPoolID; + int? notificationPoolID; MarkMessageAsReadRequestModel({this.notificationPoolID}); diff --git a/lib/core/model/packages_offers/requests/AddProductToCartRequestModel.dart b/lib/core/model/packages_offers/requests/AddProductToCartRequestModel.dart index 69e56ad7..f9a4e718 100644 --- a/lib/core/model/packages_offers/requests/AddProductToCartRequestModel.dart +++ b/lib/core/model/packages_offers/requests/AddProductToCartRequestModel.dart @@ -1,10 +1,10 @@ import 'package:flutter/cupertino.dart'; class AddProductToCartRequestModel { - int quantity; - int product_id; - String shopping_cart_type; - int customer_id; + int? quantity; + int? product_id; + String? shopping_cart_type; + int? customer_id; AddProductToCartRequestModel({@required this.product_id, this.customer_id, this.shopping_cart_type = "ShoppingCart", this.quantity = 1}); @@ -21,6 +21,6 @@ class AddProductToCartRequestModel { } class UpdateProductToCartRequestModel extends AddProductToCartRequestModel{ - UpdateProductToCartRequestModel({@required int product_id, @required int customer_id, String shopping_cart_type = "ShoppingCart", int quantity = 1}) + UpdateProductToCartRequestModel({required int product_id, required int customer_id, String shopping_cart_type = "ShoppingCart", int quantity = 1}) : super(customer_id: customer_id, product_id: product_id, quantity: quantity, shopping_cart_type: shopping_cart_type); } diff --git a/lib/core/model/packages_offers/requests/CreateCustomerRequestModel.dart b/lib/core/model/packages_offers/requests/CreateCustomerRequestModel.dart index d5022f0f..b3a3d3f6 100644 --- a/lib/core/model/packages_offers/requests/CreateCustomerRequestModel.dart +++ b/lib/core/model/packages_offers/requests/CreateCustomerRequestModel.dart @@ -4,13 +4,13 @@ import 'package:flutter/cupertino.dart'; class PackagesCustomerRequestModel { - String username; - String first_name; - String last_name; - String email; - String phone; - String national_id; - String date_of_birth; + String? username; + String? first_name; + String? last_name; + String? email; + String? phone; + String? national_id; + String? date_of_birth; PackagesCustomerRequestModel.fromUser(AuthenticatedUser user){ diff --git a/lib/core/model/packages_offers/requests/OffersCategoriesRequestModel.dart b/lib/core/model/packages_offers/requests/OffersCategoriesRequestModel.dart index 13dba945..ecaf0a5c 100644 --- a/lib/core/model/packages_offers/requests/OffersCategoriesRequestModel.dart +++ b/lib/core/model/packages_offers/requests/OffersCategoriesRequestModel.dart @@ -1,16 +1,16 @@ class OffersCategoriesRequestModel { - final int limit; - final int page; - final int sinceId; + final int? limit; + final int? page; + final int? sinceId; OffersCategoriesRequestModel({this.limit, this.page, this.sinceId}); Map toFlatMap() { return { - if(limit != null && limit > 0) + if(limit != null && limit! > 0) "limit": limit.toString(), - if(page != null && page > 0) + if(page != null && page! > 0) "page": page.toString(), }; } diff --git a/lib/core/model/packages_offers/requests/OffersProductsRequestModel.dart b/lib/core/model/packages_offers/requests/OffersProductsRequestModel.dart index 79e401a8..00e71e54 100644 --- a/lib/core/model/packages_offers/requests/OffersProductsRequestModel.dart +++ b/lib/core/model/packages_offers/requests/OffersProductsRequestModel.dart @@ -1,25 +1,25 @@ class OffersProductsRequestModel { - final int categoryId; - final int storeId; - final int limit; + final int? categoryId; + final int? storeId; + final int? limit; // final int page; - int sinceId; + int? sinceId; OffersProductsRequestModel({this.categoryId, this.limit = 50, this.storeId}); Map toFlatMap() { return { - if(limit != null && limit > 0) + if(limit != null && limit! > 0) "limit": limit.toString(), // if(page != null && page > 0) // "page": page.toString(), - if(categoryId != null && categoryId > 0) + if(categoryId != null && categoryId! > 0) "categoryId": categoryId.toString(), - if(storeId != null && storeId > 0) + if(storeId != null && storeId! > 0) "store_id": storeId.toString(), "sinceId": sinceId != null ? sinceId.toString() : "0", diff --git a/lib/core/model/packages_offers/responses/offers_stores_response_model.dart b/lib/core/model/packages_offers/responses/offers_stores_response_model.dart index 6a596e5d..b219aa56 100644 --- a/lib/core/model/packages_offers/responses/offers_stores_response_model.dart +++ b/lib/core/model/packages_offers/responses/offers_stores_response_model.dart @@ -1,21 +1,21 @@ class OfferProjectsResponseModel { OfferProjectsResponseModel({ - this.project,}); + this.project,}); OfferProjectsResponseModel.fromJson(dynamic json) { if (json['stores'] != null) { project = []; json['stores'].forEach((v) { - project.add(OfferProject.fromJson(v)); + project!.add(OfferProject.fromJson(v)); }); } } - List project; + List? project; Map toJson() { final map = {}; if (project != null) { - map['stores'] = project.map((v) => v.toJson()).toList(); + map['stores'] = project!.map((v) => v.toJson()).toList(); } return map; } @@ -31,8 +31,8 @@ class OfferProject { name = json['name']; id = json['id']; } - String name; - int id; + String? name; + int? id; Map toJson() { final map = {};