diff --git a/lib/analytics/google-analytics.dart b/lib/analytics/google-analytics.dart index 0b4b1075..dc4ef2da 100644 --- a/lib/analytics/google-analytics.dart +++ b/lib/analytics/google-analytics.dart @@ -60,7 +60,7 @@ class GAnalytics { setUser(AuthenticatedUser user) async { try { _analytics.setUserProperty(name: 'user_language', value: user.preferredLanguage == '1' ? 'arabic' : 'english'); - _analytics.setUserProperty(name: 'userid', value: Utils.generateMd5Hash(user.emailAddress)); + _analytics.setUserProperty(name: 'userid', value: Utils.generateMd5Hash(user.emailAddress!)); _analytics.setUserProperty(name: 'login_status', value: user == null ? 'guest' : 'loggedin'); if (await PermissionService.isLocationEnabled()) { final location = await Geolocator.getCurrentPosition(); diff --git a/lib/models/LiveCare/ClinicsServiceTimingsResponse.dart b/lib/models/LiveCare/ClinicsServiceTimingsResponse.dart index 0298f1c4..876037c8 100644 --- a/lib/models/LiveCare/ClinicsServiceTimingsResponse.dart +++ b/lib/models/LiveCare/ClinicsServiceTimingsResponse.dart @@ -15,26 +15,26 @@ class ClinicsServiceTimingsResponse { Map toJson() { final Map data = new Map(); if (this.patientERGetClinicsServiceTimingsList != null) { - data['PatientER_GetClinicsServiceTimingsList'] = this.patientERGetClinicsServiceTimingsList.map((v) => v.toJson()).toList(); + data['PatientER_GetClinicsServiceTimingsList'] = this.patientERGetClinicsServiceTimingsList!.map((v) => v.toJson()).toList(); } return data; } } class PatientERGetClinicsServiceTimingsList { - int iD; - int serviceID; + int? iD; + int? serviceID; Null shiftID; - int dayOfWeek; - String dayOfWeekStr; + int? dayOfWeek; + String? dayOfWeekStr; Null startTime; Null endTime; - bool isActive; - String createdOn; - String createdBy; - bool projectOutSA; - String dayOfWeekStrN; - List shiftTimings; + bool? isActive; + String? createdOn; + String? createdBy; + bool? projectOutSA; + String? dayOfWeekStrN; + List? shiftTimings; PatientERGetClinicsServiceTimingsList( {this.iD, @@ -65,9 +65,9 @@ class PatientERGetClinicsServiceTimingsList { projectOutSA = json['ProjectOutSA']; dayOfWeekStrN = json['DayOfWeekStrN']; if (json['ShiftTimings'] != null) { - shiftTimings = new List(); + shiftTimings = []; json['ShiftTimings'].forEach((v) { - shiftTimings.add(new ShiftTimings.fromJson(v)); + shiftTimings!.add(new ShiftTimings.fromJson(v)); }); } } @@ -87,16 +87,16 @@ class PatientERGetClinicsServiceTimingsList { data['ProjectOutSA'] = this.projectOutSA; data['DayOfWeekStrN'] = this.dayOfWeekStrN; if (this.shiftTimings != null) { - data['ShiftTimings'] = this.shiftTimings.map((v) => v.toJson()).toList(); + data['ShiftTimings'] = this.shiftTimings!.map((v) => v.toJson()).toList(); } return data; } } class ShiftTimings { - String endTime; - int shiftID; - String startTime; + String? endTime; + int? shiftID; + String? startTime; ShiftTimings({this.endTime, this.shiftID, this.startTime}); diff --git a/lib/models/LiveCare/ERAppointmentFeesResponse.dart b/lib/models/LiveCare/ERAppointmentFeesResponse.dart index a6cc061a..b8a88aba 100644 --- a/lib/models/LiveCare/ERAppointmentFeesResponse.dart +++ b/lib/models/LiveCare/ERAppointmentFeesResponse.dart @@ -1,5 +1,5 @@ class ERAppointmentFeesResponse { - GetERAppointmentFeesList getERAppointmentFeesList; + GetERAppointmentFeesList? getERAppointmentFeesList; ERAppointmentFeesResponse({this.getERAppointmentFeesList}); @@ -13,20 +13,20 @@ class ERAppointmentFeesResponse { Map toJson() { final Map data = new Map(); if (this.getERAppointmentFeesList != null) { - data['GetERAppointmentFeesList'] = this.getERAppointmentFeesList.toJson(); + data['GetERAppointmentFeesList'] = this.getERAppointmentFeesList!.toJson(); } return data; } } class GetERAppointmentFeesList { - String amount; - String companyName; - bool isInsured; - bool isShowInsuranceUpdateModule; - String tax; - String total; - String currency; + String? amount; + String? companyName; + bool? isInsured; + bool? isShowInsuranceUpdateModule; + String? tax; + String? total; + String? currency; GetERAppointmentFeesList( {this.amount, diff --git a/lib/models/LiveCare/IncomingCallData.dart b/lib/models/LiveCare/IncomingCallData.dart index 1ee149a3..9e7279dc 100644 --- a/lib/models/LiveCare/IncomingCallData.dart +++ b/lib/models/LiveCare/IncomingCallData.dart @@ -1,32 +1,32 @@ class IncomingCallData { - String callerID; - String receiverID; - String msgID; - String notfID; - String notificationForeground; - String count; - String message; - String appointmentNo; - String title; - String projectID; - String notificationType; - String background; - String doctorname; - String clinicname; - String speciality; - String appointmentdate; - String appointmenttime; - String type; - String sessionId; - String identity; - String name; - String videoUrl; - String picture; - String token; - String isCall; - String sound; - String server; - String isWebRTC; + String? callerID; + String? receiverID; + String? msgID; + String? notfID; + String? notificationForeground; + String? count; + String? message; + String? appointmentNo; + String? title; + String? projectID; + String? notificationType; + String? background; + String? doctorname; + String? clinicname; + String? speciality; + String? appointmentdate; + String? appointmenttime; + String? type; + String? sessionId; + String? identity; + String? name; + String? videoUrl; + String? picture; + String? token; + String? isCall; + String? sound; + String? server; + String? isWebRTC; IncomingCallData( {this.msgID, diff --git a/lib/models/LiveCare/LiveCareClinicsListResponse.dart b/lib/models/LiveCare/LiveCareClinicsListResponse.dart index 421f202f..687b3763 100644 --- a/lib/models/LiveCare/LiveCareClinicsListResponse.dart +++ b/lib/models/LiveCare/LiveCareClinicsListResponse.dart @@ -1,13 +1,13 @@ class LiveCareClinicsListResponse { - List patientERGetClinicsList; + List? patientERGetClinicsList; LiveCareClinicsListResponse({this.patientERGetClinicsList}); LiveCareClinicsListResponse.fromJson(Map json) { if (json['PatientER_GetClinicsList'] != null) { - patientERGetClinicsList = new List(); + patientERGetClinicsList = []; json['PatientER_GetClinicsList'].forEach((v) { - patientERGetClinicsList.add(new PatientERGetClinicsList.fromJson(v)); + patientERGetClinicsList!.add(new PatientERGetClinicsList.fromJson(v)); }); } } @@ -15,48 +15,47 @@ class LiveCareClinicsListResponse { Map toJson() { final Map data = new Map(); if (this.patientERGetClinicsList != null) { - data['PatientER_GetClinicsList'] = - this.patientERGetClinicsList.map((v) => v.toJson()).toList(); + data['PatientER_GetClinicsList'] = this.patientERGetClinicsList!.map((v) => v.toJson()).toList(); } return data; } } class PatientERGetClinicsList { - int iD; - int serviceID; - String serviceName; - String serviceNameN; - int clinicID; - int age; - bool isCheckAgeBelow; - int gender; - bool isActive; - String createdOn; - String createdBy; - int isOnline; + int? iD; + int? serviceID; + String? serviceName; + String? serviceNameN; + int? clinicID; + int? age; + bool? isCheckAgeBelow; + int? gender; + bool? isActive; + String? createdOn; + String? createdBy; + int? isOnline; dynamic endTime; - bool projectOutSA; - List shiftTimings; + bool? projectOutSA; + List? shiftTimings; dynamic startTime; PatientERGetClinicsList( {this.iD, - this.serviceID, - this.serviceName, - this.serviceNameN, - this.clinicID, - this.age, - this.isCheckAgeBelow, - this.gender, - this.isActive, - this.createdOn, - this.createdBy, - this.isOnline, - this.endTime, - this.projectOutSA, - this.shiftTimings, - this.startTime}); + this.serviceID, + this.serviceName, + this.serviceNameN, + this.clinicID, + this.age, + this.isCheckAgeBelow, + this.gender, + this.isActive, + this.createdOn, + this.createdBy, + this.isOnline, + this.endTime, + this.projectOutSA, + this.shiftTimings, + this.startTime}); PatientERGetClinicsList.fromJson(Map json) { iD = json['ID']; @@ -74,9 +73,9 @@ class PatientERGetClinicsList { endTime = json['EndTime']; projectOutSA = json['ProjectOutSA']; if (json['ShiftTimings'] != null) { - shiftTimings = new List(); + shiftTimings = []; json['ShiftTimings'].forEach((v) { - shiftTimings.add(new ShiftTimings.fromJson(v)); + shiftTimings!.add(new ShiftTimings.fromJson(v)); }); } startTime = json['StartTime']; @@ -99,7 +98,7 @@ class PatientERGetClinicsList { data['EndTime'] = this.endTime; data['ProjectOutSA'] = this.projectOutSA; if (this.shiftTimings != null) { - data['ShiftTimings'] = this.shiftTimings.map((v) => v.toJson()).toList(); + data['ShiftTimings'] = this.shiftTimings!.map((v) => v.toJson()).toList(); } data['StartTime'] = this.startTime; return data; @@ -107,9 +106,9 @@ class PatientERGetClinicsList { } class ShiftTimings { - String endTime; - int shiftID; - String startTime; + String? endTime; + int? shiftID; + String? startTime; ShiftTimings({this.endTime, this.shiftID, this.startTime}); diff --git a/lib/models/LiveCare/LiveCareScheduleClinicsListResponse.dart b/lib/models/LiveCare/LiveCareScheduleClinicsListResponse.dart index 8951370c..c915cfe7 100644 --- a/lib/models/LiveCare/LiveCareScheduleClinicsListResponse.dart +++ b/lib/models/LiveCare/LiveCareScheduleClinicsListResponse.dart @@ -1,13 +1,13 @@ class LiveCareScheduleClinicsListResponse { - List clinicsHaveScheduleList; + List? clinicsHaveScheduleList; LiveCareScheduleClinicsListResponse({this.clinicsHaveScheduleList}); LiveCareScheduleClinicsListResponse.fromJson(Map json) { if (json['ClinicsHaveScheduleList'] != null) { - clinicsHaveScheduleList = new List(); + clinicsHaveScheduleList = []; json['ClinicsHaveScheduleList'].forEach((v) { - clinicsHaveScheduleList.add(new ClinicsHaveScheduleList.fromJson(v)); + clinicsHaveScheduleList!.add(new ClinicsHaveScheduleList.fromJson(v)); }); } } @@ -16,20 +16,20 @@ class LiveCareScheduleClinicsListResponse { final Map data = new Map(); if (this.clinicsHaveScheduleList != null) { data['ClinicsHaveScheduleList'] = - this.clinicsHaveScheduleList.map((v) => v.toJson()).toList(); + this.clinicsHaveScheduleList!.map((v) => v.toJson()).toList(); } return data; } } class ClinicsHaveScheduleList { - int clinicID; - int serviceID; - int projectID; - String clinicDesc; - String clinicDescN; - String projectDesc; - String projectDescN; + int? clinicID; + int? serviceID; + int? projectID; + String? clinicDesc; + String? clinicDescN; + String? projectDesc; + String? projectDescN; ClinicsHaveScheduleList( {this.clinicID, diff --git a/lib/models/LiveCare/insertVIDARequest.dart b/lib/models/LiveCare/insertVIDARequest.dart index 938ca102..b6037d29 100644 --- a/lib/models/LiveCare/insertVIDARequest.dart +++ b/lib/models/LiveCare/insertVIDARequest.dart @@ -1,24 +1,24 @@ class insertVIDARequest { - int patientID; - int acceptedBy; - int appointmentNo; - String deviceToken; - double latitude; - double longitude; - int serviceID; - int projectID; - int clinicID; - String deviceType; - String voipToken; - double versionID; - int channel; - int languageID; - String iPAdress; - String generalid; - int patientOutSA; - String sessionID; - bool isDentalAllowedBackend; - int deviceTypeID; + int? patientID; + int? acceptedBy; + int? appointmentNo; + String? deviceToken; + double? latitude; + double? longitude; + int? serviceID; + int? projectID; + int? clinicID; + String? deviceType; + String? voipToken; + double? versionID; + int? channel; + int? languageID; + String? iPAdress; + String? generalid; + int? patientOutSA; + String? sessionID; + bool? isDentalAllowedBackend; + int? deviceTypeID; insertVIDARequest( {this.patientID, diff --git a/lib/models/LiveCare/room_model.dart b/lib/models/LiveCare/room_model.dart index 6ab64d1d..7e365a0f 100644 --- a/lib/models/LiveCare/room_model.dart +++ b/lib/models/LiveCare/room_model.dart @@ -2,11 +2,11 @@ import 'package:diplomaticquarterapp/models/LiveCare/room_validators.dart'; import 'package:diplomaticquarterapp/models/LiveCare/twilio_enums.dart'; class RoomModel with RoomValidators { - final String name; - final bool isLoading; + final String? name; + final bool? isLoading; final bool isSubmitted; - final String token; - final String identity; + final String? token; + final String? identity; final TwilioRoomType type; RoomModel({ @@ -34,7 +34,7 @@ class RoomModel with RoomValidators { } String get nameErrorText { - return isSubmitted && !nameValidator.isValid(name) ? invalidNameErrorText : null; + return isSubmitted && !nameValidator.isValid(name!) ? invalidNameErrorText : ""; } String get typeText { @@ -42,16 +42,16 @@ class RoomModel with RoomValidators { } bool get canSubmit { - return nameValidator.isValid(name); + return nameValidator.isValid(name!); } RoomModel copyWith({ - String name, - bool isLoading, - bool isSubmitted, - String token, - String identity, - TwilioRoomType type, + String? name, + bool? isLoading, + bool? isSubmitted, + String? token, + String? identity, + TwilioRoomType? type, }) { return RoomModel( name: name ?? this.name, diff --git a/lib/models/MyInvoices/DentalInvoiceDetailResponse.dart b/lib/models/MyInvoices/DentalInvoiceDetailResponse.dart index 6c6d605a..3d095be0 100644 --- a/lib/models/MyInvoices/DentalInvoiceDetailResponse.dart +++ b/lib/models/MyInvoices/DentalInvoiceDetailResponse.dart @@ -1,13 +1,13 @@ class DentalInvoiceDetailResponse { - List listEInvoiceForDental; + List? listEInvoiceForDental; DentalInvoiceDetailResponse({this.listEInvoiceForDental}); DentalInvoiceDetailResponse.fromJson(Map json) { if (json['List_eInvoiceForDental'] != null) { - listEInvoiceForDental = new List(); + listEInvoiceForDental = []; json['List_eInvoiceForDental'].forEach((v) { - listEInvoiceForDental.add(new ListEInvoiceForDental.fromJson(v)); + listEInvoiceForDental!.add(new ListEInvoiceForDental.fromJson(v)); }); } } @@ -15,23 +15,22 @@ class DentalInvoiceDetailResponse { Map toJson() { final Map data = new Map(); if (this.listEInvoiceForDental != null) { - data['List_eInvoiceForDental'] = - this.listEInvoiceForDental.map((v) => v.toJson()).toList(); + data['List_eInvoiceForDental'] = this.listEInvoiceForDental!.map((v) => v.toJson()).toList(); } return data; } } class ListEInvoiceForDental { - int projectID; - int doctorID; + int? projectID; + int? doctorID; dynamic grandTotal; dynamic quantity; dynamic total; dynamic discount; dynamic subTotal; - int invoiceNo; - String createdOn; + int? invoiceNo; + String? createdOn; dynamic procedureID; dynamic procedureName; dynamic procedureNameN; @@ -47,94 +46,94 @@ class ListEInvoiceForDental { dynamic companyVATAmount; dynamic totalVATAmount; dynamic price; - int patientID; - String patientName; + int? patientID; + String? patientName; dynamic patientNameN; - String nationalityID; - String doctorName; + String? nationalityID; + String? doctorName; dynamic doctorNameN; - int clinicID; - String clinicDescription; + int? clinicID; + String? clinicDescription; dynamic clinicDescriptionN; - String appointmentDate; - int appointmentNo; - String insuranceID; - int companyID; - String companyName; + String? appointmentDate; + int? appointmentNo; + String? insuranceID; + int? companyID; + String? companyName; dynamic companyNameN; - String companyAddress; + String? companyAddress; dynamic companyAddressN; - String companyGroupAddress; - String groupName; + String? companyGroupAddress; + String? groupName; dynamic groupNameN; - String patientAddress; - String vATNo; - String paymentDate; - String projectName; + String? patientAddress; + String? vATNo; + String? paymentDate; + String? projectName; dynamic totalDiscount; dynamic totalPatientShareWithQuantity; - String legalName; + String? legalName; dynamic legalNameN; dynamic advanceAdjustment; - String doctorImageURL; - List listConsultation; + String? doctorImageURL; + List? listConsultation; ListEInvoiceForDental( {this.projectID, - this.doctorID, - this.grandTotal, - this.quantity, - this.total, - this.discount, - this.subTotal, - this.invoiceNo, - this.createdOn, - this.procedureID, - this.procedureName, - this.procedureNameN, - this.procedurePrice, - this.patientShare, - this.companyShare, - this.totalPatientShare, - this.totalCompanyShare, - this.totalShare, - this.discountAmount, - this.vATPercentage, - this.patientVATAmount, - this.companyVATAmount, - this.totalVATAmount, - this.price, - this.patientID, - this.patientName, - this.patientNameN, - this.nationalityID, - this.doctorName, - this.doctorNameN, - this.clinicID, - this.clinicDescription, - this.clinicDescriptionN, - this.appointmentDate, - this.appointmentNo, - this.insuranceID, - this.companyID, - this.companyName, - this.companyNameN, - this.companyAddress, - this.companyAddressN, - this.companyGroupAddress, - this.groupName, - this.groupNameN, - this.patientAddress, - this.vATNo, - this.paymentDate, - this.projectName, - this.totalDiscount, - this.totalPatientShareWithQuantity, - this.legalName, - this.legalNameN, - this.advanceAdjustment, - this.doctorImageURL, - this.listConsultation}); + this.doctorID, + this.grandTotal, + this.quantity, + this.total, + this.discount, + this.subTotal, + this.invoiceNo, + this.createdOn, + this.procedureID, + this.procedureName, + this.procedureNameN, + this.procedurePrice, + this.patientShare, + this.companyShare, + this.totalPatientShare, + this.totalCompanyShare, + this.totalShare, + this.discountAmount, + this.vATPercentage, + this.patientVATAmount, + this.companyVATAmount, + this.totalVATAmount, + this.price, + this.patientID, + this.patientName, + this.patientNameN, + this.nationalityID, + this.doctorName, + this.doctorNameN, + this.clinicID, + this.clinicDescription, + this.clinicDescriptionN, + this.appointmentDate, + this.appointmentNo, + this.insuranceID, + this.companyID, + this.companyName, + this.companyNameN, + this.companyAddress, + this.companyAddressN, + this.companyGroupAddress, + this.groupName, + this.groupNameN, + this.patientAddress, + this.vATNo, + this.paymentDate, + this.projectName, + this.totalDiscount, + this.totalPatientShareWithQuantity, + this.legalName, + this.legalNameN, + this.advanceAdjustment, + this.doctorImageURL, + this.listConsultation}); ListEInvoiceForDental.fromJson(Map json) { projectID = json['ProjectID']; @@ -192,9 +191,9 @@ class ListEInvoiceForDental { advanceAdjustment = json['AdvanceAdjustment']; doctorImageURL = json['DoctorImageURL']; if (json['listConsultation'] != null) { - listConsultation = new List(); + listConsultation =[]; json['listConsultation'].forEach((v) { - listConsultation.add(new ListConsultation.fromJson(v)); + listConsultation!.add(new ListConsultation.fromJson(v)); }); } } @@ -256,8 +255,7 @@ class ListEInvoiceForDental { data['AdvanceAdjustment'] = this.advanceAdjustment; data['DoctorImageURL'] = this.doctorImageURL; if (this.listConsultation != null) { - data['listConsultation'] = - this.listConsultation.map((v) => v.toJson()).toList(); + data['listConsultation'] = this.listConsultation!.map((v) => v.toJson()).toList(); } return data; } @@ -273,8 +271,8 @@ class ListConsultation { dynamic subTotal; dynamic invoiceNo; dynamic createdOn; - String procedureID; - String procedureName; + String? procedureID; + String? procedureName; dynamic procedureNameN; dynamic procedurePrice; dynamic patientShare; @@ -309,7 +307,7 @@ class ListConsultation { dynamic groupName; dynamic groupNameN; dynamic patientAddress; - String vATNo; + String? vATNo; dynamic paymentDate; dynamic projectName; dynamic totalDiscount; @@ -320,58 +318,58 @@ class ListConsultation { ListConsultation( {this.projectID, - this.doctorID, - this.grandTotal, - this.quantity, - this.total, - this.discount, - this.subTotal, - this.invoiceNo, - this.createdOn, - this.procedureID, - this.procedureName, - this.procedureNameN, - this.procedurePrice, - this.patientShare, - this.companyShare, - this.totalPatientShare, - this.totalCompanyShare, - this.totalShare, - this.discountAmount, - this.vATPercentage, - this.patientVATAmount, - this.companyVATAmount, - this.totalVATAmount, - this.price, - this.patientID, - this.patientName, - this.patientNameN, - this.nationalityID, - this.doctorName, - this.doctorNameN, - this.clinicID, - this.clinicDescription, - this.clinicDescriptionN, - this.appointmentDate, - this.appointmentNo, - this.insuranceID, - this.companyID, - this.companyName, - this.companyNameN, - this.companyAddress, - this.companyAddressN, - this.companyGroupAddress, - this.groupName, - this.groupNameN, - this.patientAddress, - this.vATNo, - this.paymentDate, - this.projectName, - this.totalDiscount, - this.totalPatientShareWithQuantity, - this.legalName, - this.legalNameN, - this.advanceAdjustment}); + this.doctorID, + this.grandTotal, + this.quantity, + this.total, + this.discount, + this.subTotal, + this.invoiceNo, + this.createdOn, + this.procedureID, + this.procedureName, + this.procedureNameN, + this.procedurePrice, + this.patientShare, + this.companyShare, + this.totalPatientShare, + this.totalCompanyShare, + this.totalShare, + this.discountAmount, + this.vATPercentage, + this.patientVATAmount, + this.companyVATAmount, + this.totalVATAmount, + this.price, + this.patientID, + this.patientName, + this.patientNameN, + this.nationalityID, + this.doctorName, + this.doctorNameN, + this.clinicID, + this.clinicDescription, + this.clinicDescriptionN, + this.appointmentDate, + this.appointmentNo, + this.insuranceID, + this.companyID, + this.companyName, + this.companyNameN, + this.companyAddress, + this.companyAddressN, + this.companyGroupAddress, + this.groupName, + this.groupNameN, + this.patientAddress, + this.vATNo, + this.paymentDate, + this.projectName, + this.totalDiscount, + this.totalPatientShareWithQuantity, + this.legalName, + this.legalNameN, + this.advanceAdjustment}); ListConsultation.fromJson(Map json) { projectID = json['ProjectID']; diff --git a/lib/models/MyInvoices/GetDentalAppointmentsResponse.dart b/lib/models/MyInvoices/GetDentalAppointmentsResponse.dart index f7294f3c..e0f39619 100644 --- a/lib/models/MyInvoices/GetDentalAppointmentsResponse.dart +++ b/lib/models/MyInvoices/GetDentalAppointmentsResponse.dart @@ -1,13 +1,13 @@ class GetDentalAppointmentsResponse { - List listDentalAppointments; + List? listDentalAppointments; GetDentalAppointmentsResponse({this.listDentalAppointments}); GetDentalAppointmentsResponse.fromJson(Map json) { if (json['List_DentalAppointments'] != null) { - listDentalAppointments = new List(); + listDentalAppointments = []; json['List_DentalAppointments'].forEach((v) { - listDentalAppointments.add(new ListDentalAppointments.fromJson(v)); + listDentalAppointments!.add(new ListDentalAppointments.fromJson(v)); }); } } @@ -16,32 +16,32 @@ class GetDentalAppointmentsResponse { final Map data = new Map(); if (this.listDentalAppointments != null) { data['List_DentalAppointments'] = - this.listDentalAppointments.map((v) => v.toJson()).toList(); + this.listDentalAppointments!.map((v) => v.toJson()).toList(); } return data; } } class ListDentalAppointments { - String setupId; - int projectID; - int patientID; - int appointmentNo; - String appointmentDate; + String? setupId; + int? projectID; + int? patientID; + int? appointmentNo; + String? appointmentDate; dynamic appointmentDateN; - int clinicID; - int doctorID; - int invoiceNo; - int status; - String arrivedOn; + int? clinicID; + int? doctorID; + int? invoiceNo; + int? status; + String? arrivedOn; dynamic doctorName; - String doctorNameN; - String clinicName; + String? doctorNameN; + String? clinicName; dynamic decimalDoctorRate; - String doctorImageURL; + String? doctorImageURL; dynamic doctorRate; - int patientNumber; - String projectName; + int? patientNumber; + String? projectName; ListDentalAppointments( {this.setupId, diff --git a/lib/models/pharmacy/addToCartModel.dart b/lib/models/pharmacy/addToCartModel.dart index 3253e6f7..bdc2fcd9 100644 --- a/lib/models/pharmacy/addToCartModel.dart +++ b/lib/models/pharmacy/addToCartModel.dart @@ -19,13 +19,13 @@ class ShoppingCart { this.shoppingCarts, }); - int itemCount; - int quantityCount; - double subtotal; - double subtotalWithVat; - double subtotalVatAmount; - int subtotalVatRate; - List shoppingCarts; + int? itemCount; + int? quantityCount; + double? subtotal; + double? subtotalWithVat; + double? subtotalVatAmount; + int? subtotalVatRate; + List? shoppingCarts; factory ShoppingCart.fromJson(Map json) => ShoppingCart( itemCount: json["item_count"], @@ -73,27 +73,27 @@ class ShoppingCartElement { this.customer, }); - int languageId; - String id; - List productAttributes; - int customerEnteredPrice; - int quantity; + int? languageId; + String ?id; + List? productAttributes; + int? customerEnteredPrice; + int? quantity; dynamic discountAmountInclTax; - String subtotal; - String subtotalWithVat; - String subtotalVatAmount; - String subtotalVatRate; - String currency; - String currencyn; + String? subtotal; + String? subtotalWithVat; + String? subtotalVatAmount; + String? subtotalVatRate; + String? currency; + String? currencyn; dynamic rentalStartDateUtc; dynamic rentalEndDateUtc; - DateTime createdOnUtc; - DateTime updatedOnUtc; - String shoppingCartType; - int productId; - Product product; - int customerId; - Customer customer; + DateTime? createdOnUtc; + DateTime? updatedOnUtc; + String? shoppingCartType; + int? productId; + Product? product; + int? customerId; + Customer? customer; factory ShoppingCartElement.fromJson(Map json) => ShoppingCartElement( languageId: json["language_id"], @@ -122,7 +122,7 @@ class ShoppingCartElement { Map toJson() => { "language_id": languageId, "id": id, - "product_attributes": List.from(productAttributes.map((x) => x)), + "product_attributes": List.from(productAttributes!.map((x) => x)), "customer_entered_price": customerEnteredPrice, "quantity": quantity, "discount_amount_incl_tax": discountAmountInclTax, @@ -134,13 +134,13 @@ class ShoppingCartElement { "currencyn": currencyn, "rental_start_date_utc": rentalStartDateUtc, "rental_end_date_utc": rentalEndDateUtc, - "created_on_utc": createdOnUtc.toIso8601String(), - "updated_on_utc": updatedOnUtc.toIso8601String(), + "created_on_utc": createdOnUtc!.toIso8601String(), + "updated_on_utc": updatedOnUtc!.toIso8601String(), "shopping_cart_type": shoppingCartType, "product_id": productId, - "product": product.toJson(), + "product": product!.toJson(), "customer_id": customerId, - "customer": customer.toJson(), + "customer": customer!.toJson(), }; } @@ -170,28 +170,28 @@ class Customer { this.roleIds, }); - Address billingAddress; - Address shippingAddress; - List
addresses; - String id; - String username; - String email; + Address? billingAddress; + Address? shippingAddress; + List
? addresses; + String? id; + String? username; + String? email; dynamic firstName; dynamic lastName; dynamic languageId; dynamic adminComment; - bool isTaxExempt; - bool hasShoppingCartItems; - bool active; - bool deleted; - bool isSystemAccount; + bool? isTaxExempt; + bool? hasShoppingCartItems; + bool? active; + bool? deleted; + bool? isSystemAccount; dynamic systemName; - String lastIpAddress; - DateTime createdOnUtc; - DateTime lastLoginDateUtc; - DateTime lastActivityDateUtc; - int registeredInStoreId; - List roleIds; + String?lastIpAddress; + DateTime? createdOnUtc; + DateTime? lastLoginDateUtc; + DateTime? lastActivityDateUtc; + int? registeredInStoreId; + List? roleIds; factory Customer.fromJson(Map json) => Customer( billingAddress: Address.fromJson(json["billing_address"]), @@ -219,9 +219,9 @@ class Customer { ); Map toJson() => { - "billing_address": billingAddress.toJson(), - "shipping_address": shippingAddress.toJson(), - "addresses": List.from(addresses.map((x) => x.toJson())), + "billing_address": billingAddress!.toJson(), + "shipping_address": shippingAddress!.toJson(), + "addresses": List.from(addresses!.map((x) => x.toJson())), "id": id, "username": username, "email": email, @@ -236,11 +236,11 @@ class Customer { "is_system_account": isSystemAccount, "system_name": systemName, "last_ip_address": lastIpAddress, - "created_on_utc": createdOnUtc.toIso8601String(), - "last_login_date_utc": lastLoginDateUtc.toIso8601String(), - "last_activity_date_utc": lastActivityDateUtc.toIso8601String(), + "created_on_utc": createdOnUtc!.toIso8601String(), + "last_login_date_utc": lastLoginDateUtc!.toIso8601String(), + "last_activity_date_utc": lastActivityDateUtc!.toIso8601String(), "registered_in_store_id": registeredInStoreId, - "role_ids": List.from(roleIds.map((x) => x)), + "role_ids": List.from(roleIds!.map((x) => x)), }; } @@ -266,24 +266,24 @@ class Address { this.latLong, }); - String id; - FirstName firstName; - LastName lastName; - Email email; + String? id; + FirstName? firstName; + LastName? lastName; + Email? email; dynamic company; - int countryId; - Country country; + int? countryId; + Country? country; dynamic stateProvinceId; - City city; - String address1; - String address2; - String zipPostalCode; - String phoneNumber; + City? city; + String? address1; + String? address2; + String? zipPostalCode; + String? phoneNumber; dynamic faxNumber; - String customerAttributes; - DateTime createdOnUtc; + String? customerAttributes; + DateTime? createdOnUtc; dynamic province; - String latLong; + String? latLong; factory Address.fromJson(Map json) => Address( id: json["id"], @@ -322,7 +322,7 @@ class Address { "phone_number": phoneNumber, "fax_number": faxNumber, "customer_attributes": customerAttributes, - "created_on_utc": createdOnUtc.toIso8601String(), + "created_on_utc": createdOnUtc!.toIso8601String(), "province": province, "lat_long": latLong, }; @@ -480,117 +480,117 @@ class Product { this.seName, }); - String id; - bool visibleIndividually; - String name; - String namen; - List localizedNames; - String shortDescription; - String shortDescriptionn; - String fullDescription; - String fullDescriptionn; - bool markasNew; - bool showOnHomePage; - String metaKeywords; - String metaDescription; - String metaTitle; - bool allowCustomerReviews; - int approvedRatingSum; - int notApprovedRatingSum; - int approvedTotalReviews; - int notApprovedTotalReviews; - String sku; - bool isRx; - bool prescriptionRequired; + String? id; + bool? visibleIndividually; + String? name; + String? namen; + List? localizedNames; + String? shortDescription; + String? shortDescriptionn; + String? fullDescription; + String? fullDescriptionn; + bool? markasNew; + bool? showOnHomePage; + String? metaKeywords; + String? metaDescription; + String? metaTitle; + bool? allowCustomerReviews; + int? approvedRatingSum; + int? notApprovedRatingSum; + int? approvedTotalReviews; + int? notApprovedTotalReviews; + String? sku; + bool? isRx; + bool? prescriptionRequired; dynamic rxMessage; dynamic rxMessagen; dynamic manufacturerPartNumber; dynamic gtin; - bool isGiftCard; - bool requireOtherProducts; - bool automaticallyAddRequiredProducts; - bool isDownload; - bool unlimitedDownloads; - int maxNumberOfDownloads; + bool? isGiftCard; + bool? requireOtherProducts; + bool? automaticallyAddRequiredProducts; + bool? isDownload; + bool? unlimitedDownloads; + int? maxNumberOfDownloads; dynamic downloadExpirationDays; - bool hasSampleDownload; - bool hasUserAgreement; - bool isRecurring; - int recurringCycleLength; - int recurringTotalCycles; - bool isRental; - int rentalPriceLength; - bool isShipEnabled; - bool isFreeShipping; - bool shipSeparately; - int additionalShippingCharge; - bool isTaxExempt; - bool isTelecommunicationsOrBroadcastingOrElectronicServices; - bool useMultipleWarehouses; - int manageInventoryMethodId; - int stockQuantity; - String stockAvailability; - String stockAvailabilityn; - bool displayStockAvailability; - bool displayStockQuantity; - int minStockQuantity; - int notifyAdminForQuantityBelow; - bool allowBackInStockSubscriptions; - int orderMinimumQuantity; - int orderMaximumQuantity; + bool? hasSampleDownload; + bool? hasUserAgreement; + bool? isRecurring; + int? recurringCycleLength; + int? recurringTotalCycles; + bool? isRental; + int? rentalPriceLength; + bool? isShipEnabled; + bool? isFreeShipping; + bool? shipSeparately; + int? additionalShippingCharge; + bool? isTaxExempt; + bool? isTelecommunicationsOrBroadcastingOrElectronicServices; + bool? useMultipleWarehouses; + int? manageInventoryMethodId; + int? stockQuantity; + String? stockAvailability; + String? stockAvailabilityn; + bool? displayStockAvailability; + bool? displayStockQuantity; + int? minStockQuantity; + int? notifyAdminForQuantityBelow; + bool? allowBackInStockSubscriptions; + int? orderMinimumQuantity; + int? orderMaximumQuantity; dynamic allowedQuantities; - bool allowAddingOnlyExistingAttributeCombinations; - bool disableBuyButton; - bool disableWishlistButton; - bool availableForPreOrder; + bool? allowAddingOnlyExistingAttributeCombinations; + bool? disableBuyButton; + bool? disableWishlistButton; + bool? availableForPreOrder; dynamic preOrderAvailabilityStartDateTimeUtc; - bool callForPrice; - double price; - int oldPrice; - double productCost; + bool? callForPrice; + double? price; + int? oldPrice; + double? productCost; dynamic specialPrice; dynamic specialPriceStartDateTimeUtc; dynamic specialPriceEndDateTimeUtc; - bool customerEntersPrice; - int minimumCustomerEnteredPrice; - int maximumCustomerEnteredPrice; - bool basepriceEnabled; - int basepriceAmount; - int basepriceBaseAmount; - bool hasTierPrices; - bool hasDiscountsApplied; + bool? customerEntersPrice; + int? minimumCustomerEnteredPrice; + int? maximumCustomerEnteredPrice; + bool? basepriceEnabled; + int? basepriceAmount; + int? basepriceBaseAmount; + bool? hasTierPrices; + bool? hasDiscountsApplied; dynamic discountName; dynamic discountNamen; dynamic discountDescription; dynamic discountDescriptionn; dynamic discountPercentage; - String currency; - String currencyn; - double weight; - int length; - int width; - int height; + String? currency; + String? currencyn; + double? weight; + int? length; + int? width; + int? height; dynamic availableStartDateTimeUtc; dynamic availableEndDateTimeUtc; - int displayOrder; - bool published; - bool deleted; - DateTime createdOnUtc; - DateTime updatedOnUtc; - String productType; - int parentGroupedProductId; - List roleIds; - List discountIds; - List storeIds; - List manufacturerIds; - List reviews; - List images; - List attributes; - List specifications; - List associatedProductIds; - List tags; - int vendorId; - String seName; + int? displayOrder; + bool? published; + bool? deleted; + DateTime? createdOnUtc; + DateTime? updatedOnUtc; + String? productType; + int? parentGroupedProductId; + List? roleIds; + List? discountIds; + List? storeIds; + List? manufacturerIds; + List? reviews; + List? images; + List? attributes; + List? specifications; + List? associatedProductIds; + List? tags; + int? vendorId; + String? seName; factory Product.fromJson(Map json) => Product( id: json["id"], @@ -711,7 +711,7 @@ class Product { "visible_individually": visibleIndividually, "name": name, "namen": namen, - "localized_names": List.from(localizedNames.map((x) => x.toJson())), + "localized_names": List.from(localizedNames!.map((x) => x.toJson())), "short_description": shortDescription, "short_descriptionn": shortDescriptionn, "full_description": fullDescription, @@ -802,20 +802,20 @@ class Product { "display_order": displayOrder, "published": published, "deleted": deleted, - "created_on_utc": createdOnUtc.toIso8601String(), - "updated_on_utc": updatedOnUtc.toIso8601String(), + "created_on_utc": createdOnUtc!.toIso8601String(), + "updated_on_utc": updatedOnUtc!.toIso8601String(), "product_type": productType, "parent_grouped_product_id": parentGroupedProductId, - "role_ids": List.from(roleIds.map((x) => x)), - "discount_ids": List.from(discountIds.map((x) => x)), - "store_ids": List.from(storeIds.map((x) => x)), - "manufacturer_ids": List.from(manufacturerIds.map((x) => x)), - "reviews": List.from(reviews.map((x) => x)), - "images": List.from(images.map((x) => x.toJson())), - "attributes": List.from(attributes.map((x) => x)), - "specifications": List.from(specifications.map((x) => x.toJson())), - "associated_product_ids": List.from(associatedProductIds.map((x) => x)), - "tags": List.from(tags.map((x) => x)), + "role_ids": List.from(roleIds!.map((x) => x)), + "discount_ids": List.from(discountIds!.map((x) => x)), + "store_ids": List.from(storeIds!.map((x) => x)), + "manufacturer_ids": List.from(manufacturerIds!.map((x) => x)), + "reviews": List.from(reviews!.map((x) => x)), + "images": List.from(images!.map((x) => x.toJson())), + "attributes": List.from(attributes!.map((x) => x)), + "specifications": List.from(specifications!.map((x) => x.toJson())), + "associated_product_ids": List.from(associatedProductIds!.map((x) => x)), + "tags": List.from(tags!.map((x) => x)), "vendor_id": vendorId, "se_name": seName, }; @@ -830,11 +830,11 @@ class Image { this.attachment, }); - int id; - int position; - String src; - String thumb; - String attachment; + int? id; + int? position; + String? src; + String? thumb; + String? attachment; factory Image.fromJson(Map json) => Image( id: json["id"], @@ -859,8 +859,8 @@ class LocalizedName { this.localizedName, }); - int languageId; - String localizedName; + int? languageId; + String? localizedName; factory LocalizedName.fromJson(Map json) => LocalizedName( languageId: json["language_id"], @@ -883,12 +883,12 @@ class Specification { this.nameN, }); - int id; - int displayOrder; - String defaultValue; - String defaultValuen; - String name; - String nameN; + int? id; + int? displayOrder; + String? defaultValue; + String? defaultValuen; + String? name; + String? nameN; factory Specification.fromJson(Map json) => Specification( id: json["id"], @@ -910,15 +910,15 @@ class Specification { } class EnumValues { - Map map; - Map reverseMap; + Map? map; + Map? reverseMap; EnumValues(this.map); Map get reverse { if (reverseMap == null) { - reverseMap = map.map((k, v) => new MapEntry(v, k)); + reverseMap = map!.map((k, v) => new MapEntry(v, k)); } - return reverseMap; + return reverseMap!; } }