From 4b7688d62002b5e6bd6f8fc8c7c38988f462128e Mon Sep 17 00:00:00 2001 From: Zohaib Iqbal Kambrani <> Date: Mon, 26 Apr 2021 15:59:30 +0300 Subject: [PATCH 1/3] showDailog Migration DateUtils Conflict with Material (DateUtils -> AppDateUtils) --- lib/core/model/DischargeReferralPatient.dart | 2 +- lib/core/model/MyReferralPatientModel.dart | 2 +- lib/core/model/PatientMuseResultsModel.dart | 2 +- .../model/Prescriptions/Prescriptions.dart | 2 +- .../Prescriptions/prescriptions_order.dart | 4 +- lib/core/model/labs/patient_lab_orders.dart | 2 +- lib/core/model/radiology/final_radiology.dart | 4 +- lib/core/service/prescription_service.dart | 2 +- .../viewModel/patient-ucaf-viewmodel.dart | 4 +- .../patient-vital-sign-viewmodel.dart | 4 +- ...list_doctor_working_hours_table_model.dart | 2 +- .../list_gt_my_patients_question_model.dart | 2 +- .../lab_orders/lab_orders_res_model.dart | 2 +- .../my_referral_patient_model.dart | 2 +- .../prescription_report_for_in_patient.dart | 6 +-- .../vital_sign/vital_sign_res_model.dart | 2 +- lib/screens/doctor/doctor_repaly_chat.dart | 4 +- .../doctor/patient_arrival_screen.dart | 4 +- lib/screens/home/home_screen.dart | 4 +- .../medical-file/medical_file_details.dart | 4 +- .../medical-file/medical_file_page.dart | 2 +- .../patients/DischargedPatientPage.dart | 6 +-- lib/screens/patients/ECGPage.dart | 4 +- .../ReferralDischargedPatientDetails.dart | 14 +++--- .../ReferralDischargedPatientPage.dart | 4 +- .../patients/insurance_approvals_details.dart | 8 ++-- lib/screens/patients/patients_screen.dart | 16 +++---- .../admission-request-detail-screen.dart | 2 +- .../admission-request_second-screen.dart | 2 +- .../Lab_Result_details_wideget.dart | 4 +- .../profile/lab_result/LineChartCurved.dart | 2 +- .../profile/note/progress_note_screen.dart | 15 ++++--- ...n_patient_prescription_details_screen.dart | 6 +-- .../referral/my-referral-detail-screen.dart | 4 +- .../my-referral-inpatient-screen.dart | 4 +- .../referral/refer-patient-screen.dart | 2 +- .../referral_patient_detail_in-paint.dart | 14 +++--- .../referral/referred-patient-screen.dart | 4 +- .../referred_patient_detail_in-paint.dart | 14 +++--- .../assessment/update_assessment_page.dart | 8 ++-- .../soap_update/plan/update_plan_page.dart | 4 +- .../vital_sign_detail_pain_scale.dart | 2 +- ...al_sign_details_blood_pressurewideget.dart | 4 +- .../vital_sign_details_wideget.dart | 4 +- .../vital_sing_chart_and_detials.dart | 2 +- .../vital_sing_chart_blood_pressure.dart | 2 +- .../prescription/add_prescription_form.dart | 2 +- .../prescription_item_in_patient_page.dart | 4 +- .../prescription/prescription_items_page.dart | 6 +-- .../prescription/prescription_screen.dart | 6 +-- .../prescription_screen_history.dart | 6 +-- .../prescription/prescriptions_page.dart | 8 ++-- .../update_prescription_form.dart | 4 +- lib/screens/procedures/ProcedureCard.dart | 4 +- .../add-rescheduleleave.dart | 6 +-- lib/screens/sick-leave/add-sickleave.dart | 2 +- lib/screens/sick-leave/show-sickleave.dart | 2 +- lib/util/date-utils.dart | 4 +- lib/widgets/auth/verification_methods.dart | 8 ++-- lib/widgets/doctor/doctor_reply_widget.dart | 14 +++--- lib/widgets/doctor/my_schedule_widget.dart | 8 ++-- lib/widgets/patients/PatientCard.dart | 8 ++-- .../profile/PatientProfileButton.dart | 4 +- ...ent-profile-header-new-design-app-bar.dart | 4 +- .../patient-profile-header-new-design.dart | 4 +- ...-profile-header-new-design_in_patient.dart | 6 +-- ..._profile_header_with_appointment_card.dart | 6 +-- ..._header_with_appointment_card_app_bar.dart | 6 +-- .../patients/vital_sign_details_wideget.dart | 2 +- lib/widgets/shared/doctor_card.dart | 4 +- .../loader/gif_loader_dialog_utils.dart | 2 +- .../user-guid/in_patient_doctor_card.dart | 4 +- pubspec.lock | 44 +++++++++---------- pubspec.yaml | 5 +++ 74 files changed, 201 insertions(+), 195 deletions(-) diff --git a/lib/core/model/DischargeReferralPatient.dart b/lib/core/model/DischargeReferralPatient.dart index 523d8d0a..dff63bfc 100644 --- a/lib/core/model/DischargeReferralPatient.dart +++ b/lib/core/model/DischargeReferralPatient.dart @@ -139,7 +139,7 @@ class DischargeReferralPatient { referralClinic = json['ReferralClinic']; referringClinic = json['ReferringClinic']; referralStatus = json['ReferralStatus']; - referralDate = DateUtils.convertStringToDate(json['ReferralDate']); + referralDate = AppDateUtils.convertStringToDate(json['ReferralDate']); referringDoctorRemarks = json['ReferringDoctorRemarks']; referredDoctorRemarks = json['ReferredDoctorRemarks']; referralResponseOn = json['ReferralResponseOn']; diff --git a/lib/core/model/MyReferralPatientModel.dart b/lib/core/model/MyReferralPatientModel.dart index f2c9c425..797109dd 100644 --- a/lib/core/model/MyReferralPatientModel.dart +++ b/lib/core/model/MyReferralPatientModel.dart @@ -159,7 +159,7 @@ class MyReferralPatientModel { referralClinic = json['ReferralClinic']; referringClinic = json['ReferringClinic']; referralStatus = json['ReferralStatus']; - referralDate = DateUtils.convertStringToDate(json['ReferralDate']); + referralDate = AppDateUtils.convertStringToDate(json['ReferralDate']); referringDoctorRemarks = json['ReferringDoctorRemarks']; referredDoctorRemarks = json['ReferredDoctorRemarks']; referralResponseOn = json['ReferralResponseOn']; diff --git a/lib/core/model/PatientMuseResultsModel.dart b/lib/core/model/PatientMuseResultsModel.dart index 8b10de83..401fd1a7 100644 --- a/lib/core/model/PatientMuseResultsModel.dart +++ b/lib/core/model/PatientMuseResultsModel.dart @@ -42,7 +42,7 @@ class PatientMuseResultsModel { imageURL = json['ImageURL']; createdBy = json['CreatedBy']; createdOn = json['CreatedOn']; - createdOnDateTime = DateUtils.getDateTimeFromServerFormat(json['CreatedOn']); + createdOnDateTime = AppDateUtils.getDateTimeFromServerFormat(json['CreatedOn']); } Map toJson() { diff --git a/lib/core/model/Prescriptions/Prescriptions.dart b/lib/core/model/Prescriptions/Prescriptions.dart index 78bc9105..c47a813a 100644 --- a/lib/core/model/Prescriptions/Prescriptions.dart +++ b/lib/core/model/Prescriptions/Prescriptions.dart @@ -86,7 +86,7 @@ class Prescriptions { clinicID = json['ClinicID']; companyName = json['CompanyName']; despensedStatus = json['Despensed_Status']; - dischargeDate = DateUtils.convertStringToDate(json['DischargeDate']); + dischargeDate = AppDateUtils.convertStringToDate(json['DischargeDate']); dischargeNo = json['DischargeNo']; doctorID = json['DoctorID']; doctorImageURL = json['DoctorImageURL']; diff --git a/lib/core/model/Prescriptions/prescriptions_order.dart b/lib/core/model/Prescriptions/prescriptions_order.dart index 4f77f7ec..f51420ec 100644 --- a/lib/core/model/Prescriptions/prescriptions_order.dart +++ b/lib/core/model/Prescriptions/prescriptions_order.dart @@ -79,10 +79,10 @@ class PrescriptionsOrder { status = json['Status']; description = json['Description']; descriptionN = json['DescriptionN']; - createdOn = DateUtils.convertStringToDate(json['CreatedOn']); + createdOn = AppDateUtils.convertStringToDate(json['CreatedOn']); serviceID = json['ServiceID']; createdBy = json['CreatedBy']; - editedOn = DateUtils.convertStringToDate(json['EditedOn']); + editedOn = AppDateUtils.convertStringToDate(json['EditedOn']); editedBy = json['EditedBy']; channel = json['Channel']; clientRequestID = json['ClientRequestID']; diff --git a/lib/core/model/labs/patient_lab_orders.dart b/lib/core/model/labs/patient_lab_orders.dart index 6f989543..af60f86f 100644 --- a/lib/core/model/labs/patient_lab_orders.dart +++ b/lib/core/model/labs/patient_lab_orders.dart @@ -95,7 +95,7 @@ class PatientLabOrders { isRead = json['IsRead']; nationalityFlagURL = json['NationalityFlagURL']; noOfPatientsRate = json['NoOfPatientsRate']; - orderDate = DateUtils.convertStringToDate(json['OrderDate']); + orderDate = AppDateUtils.convertStringToDate(json['OrderDate']); orderNo = json['OrderNo'].toString(); patientID = json['PatientID'].toString(); projectID = json['ProjectID'].toString(); diff --git a/lib/core/model/radiology/final_radiology.dart b/lib/core/model/radiology/final_radiology.dart index 1d406b81..b2551a18 100644 --- a/lib/core/model/radiology/final_radiology.dart +++ b/lib/core/model/radiology/final_radiology.dart @@ -96,8 +96,8 @@ class FinalRadiology { invoiceNo = json['InvoiceNo']; doctorID = json['DoctorID']; clinicID = json['ClinicID']; - orderDate = DateUtils.convertStringToDate(json['OrderDate']); - reportDate = DateUtils.convertStringToDate(json['ReportDate']); + orderDate = AppDateUtils.convertStringToDate(json['OrderDate']); + reportDate = AppDateUtils.convertStringToDate(json['ReportDate']); reportData = json['ReportData']; imageURL = json['ImageURL']; procedureID = json['ProcedureID']; diff --git a/lib/core/service/prescription_service.dart b/lib/core/service/prescription_service.dart index dc74901e..720cd28e 100644 --- a/lib/core/service/prescription_service.dart +++ b/lib/core/service/prescription_service.dart @@ -218,7 +218,7 @@ class PrescriptionService extends LookupService { "Prescription": { "objPatientInfo": { "Gender": patient.gender == 1 ? 'Male' : 'Female', - "Age": DateUtils.convertDateFromServerFormat( + "Age": AppDateUtils.convertDateFromServerFormat( patient.dateofBirth, 'dd/MM/yyyy') }, "objVitalSign": {"Height": vital?.heightCm, "Weight": vital?.weightKg}, diff --git a/lib/core/viewModel/patient-ucaf-viewmodel.dart b/lib/core/viewModel/patient-ucaf-viewmodel.dart index dc76884d..e8040156 100644 --- a/lib/core/viewModel/patient-ucaf-viewmodel.dart +++ b/lib/core/viewModel/patient-ucaf-viewmodel.dart @@ -61,10 +61,10 @@ class UcafViewModel extends BaseViewModel { String from; String to; if (from == null || from == "0") { - from = DateUtils.convertDateToFormat(DateTime.now(), 'yyyy-MM-dd'); + from = AppDateUtils.convertDateToFormat(DateTime.now(), 'yyyy-MM-dd'); } if (to == null || to == "0") { - to = DateUtils.convertDateToFormat(DateTime.now(), 'yyyy-MM-dd'); + to = AppDateUtils.convertDateToFormat(DateTime.now(), 'yyyy-MM-dd'); } // await _ucafService.getPatientVitalSignsHistory(patient, from, to); diff --git a/lib/core/viewModel/patient-vital-sign-viewmodel.dart b/lib/core/viewModel/patient-vital-sign-viewmodel.dart index 6786ad92..6ca63a30 100644 --- a/lib/core/viewModel/patient-vital-sign-viewmodel.dart +++ b/lib/core/viewModel/patient-vital-sign-viewmodel.dart @@ -46,10 +46,10 @@ class VitalSignsViewModel extends BaseViewModel { String to, bool isInPatient) async { setState(ViewState.Busy); if (from == null || from == "0") { - from = DateUtils.convertDateToFormat(DateTime.now(), 'yyyy-MM-dd'); + from = AppDateUtils.convertDateToFormat(DateTime.now(), 'yyyy-MM-dd'); } if (to == null || to == "0") { - to = DateUtils.convertDateToFormat(DateTime.now(), 'yyyy-MM-dd'); + to = AppDateUtils.convertDateToFormat(DateTime.now(), 'yyyy-MM-dd'); } await _vitalSignService.getInPatientVitalSignHistory(patient, isInPatient); diff --git a/lib/models/doctor/list_doctor_working_hours_table_model.dart b/lib/models/doctor/list_doctor_working_hours_table_model.dart index 9b64e588..4712d285 100644 --- a/lib/models/doctor/list_doctor_working_hours_table_model.dart +++ b/lib/models/doctor/list_doctor_working_hours_table_model.dart @@ -15,7 +15,7 @@ class ListDoctorWorkingHoursTable { }); ListDoctorWorkingHoursTable.fromJson(Map json) { - date = DateUtils.convertStringToDate(json['Date']); + date = AppDateUtils.convertStringToDate(json['Date']); dayName = json['DayName']; workingHours = json['WorkingHours']; projectName = json['ProjectName']; diff --git a/lib/models/doctor/list_gt_my_patients_question_model.dart b/lib/models/doctor/list_gt_my_patients_question_model.dart index 33a314e3..35d09812 100644 --- a/lib/models/doctor/list_gt_my_patients_question_model.dart +++ b/lib/models/doctor/list_gt_my_patients_question_model.dart @@ -70,7 +70,7 @@ class ListGtMyPatientsQuestions { patientID = json['PatientID']; doctorID = json['DoctorID']; requestType = json['RequestType']; - requestDate = DateUtils.convertStringToDate(json['RequestDate']) ; + requestDate = AppDateUtils.convertStringToDate(json['RequestDate']) ; requestTime = json['RequestTime']; remarks = json['Remarks']; status = json['Status']; diff --git a/lib/models/patient/lab_orders/lab_orders_res_model.dart b/lib/models/patient/lab_orders/lab_orders_res_model.dart index 893b49ae..7f463933 100644 --- a/lib/models/patient/lab_orders/lab_orders_res_model.dart +++ b/lib/models/patient/lab_orders/lab_orders_res_model.dart @@ -62,7 +62,7 @@ class LabOrdersResModel { status = json['Status']; createdBy = json['CreatedBy']; createdByN = json['CreatedByN']; - createdOn = DateUtils.convertStringToDate(json['CreatedOn']); + createdOn = AppDateUtils.convertStringToDate(json['CreatedOn']); editedBy = json['EditedBy']; editedByN = json['EditedByN']; editedOn = json['EditedOn']; diff --git a/lib/models/patient/my_referral/my_referral_patient_model.dart b/lib/models/patient/my_referral/my_referral_patient_model.dart index ab14a82f..f1506f8e 100644 --- a/lib/models/patient/my_referral/my_referral_patient_model.dart +++ b/lib/models/patient/my_referral/my_referral_patient_model.dart @@ -142,7 +142,7 @@ class MyReferralPatientModel { referralResponseOn = json['ReferralResponseOn']; priority = json['Priority']; frequency = json['Frequency']; - mAXResponseTime = DateUtils.convertStringToDate(json['MAXResponseTime']); + mAXResponseTime = AppDateUtils.convertStringToDate(json['MAXResponseTime']); age = json['Age']; frequencyDescription = json['FrequencyDescription']; genderDescription = json['GenderDescription']; diff --git a/lib/models/patient/prescription/prescription_report_for_in_patient.dart b/lib/models/patient/prescription/prescription_report_for_in_patient.dart index 8e643866..21cb13b1 100644 --- a/lib/models/patient/prescription/prescription_report_for_in_patient.dart +++ b/lib/models/patient/prescription/prescription_report_for_in_patient.dart @@ -125,7 +125,7 @@ class PrescriptionReportForInPatient { orderNo = json['OrderNo']; patientID = json['PatientID']; pharmacyRemarks = json['PharmacyRemarks']; - prescriptionDatetime = DateUtils.convertStringToDate(json['PrescriptionDatetime']); + prescriptionDatetime = AppDateUtils.convertStringToDate(json['PrescriptionDatetime']); prescriptionNo = json['PrescriptionNo']; processedBy = json['ProcessedBy']; projectID = json['ProjectID']; @@ -138,11 +138,11 @@ class PrescriptionReportForInPatient { routeId = json['RouteId']; routeN = json['RouteN']; setupID = json['SetupID']; - startDatetime = DateUtils.convertStringToDate(json['StartDatetime']) ; + startDatetime = AppDateUtils.convertStringToDate(json['StartDatetime']) ; status = json['Status']; statusDescription = json['StatusDescription']; statusDescriptionN = json['StatusDescriptionN']; - stopDatetime = DateUtils.convertStringToDate(json['StopDatetime']); + stopDatetime = AppDateUtils.convertStringToDate(json['StopDatetime']); unitofMeasurement = json['UnitofMeasurement']; unitofMeasurementDescription = json['UnitofMeasurementDescription']; unitofMeasurementDescriptionN = json['UnitofMeasurementDescriptionN']; diff --git a/lib/models/patient/vital_sign/vital_sign_res_model.dart b/lib/models/patient/vital_sign/vital_sign_res_model.dart index 09bb1797..78af108d 100644 --- a/lib/models/patient/vital_sign/vital_sign_res_model.dart +++ b/lib/models/patient/vital_sign/vital_sign_res_model.dart @@ -170,7 +170,7 @@ class VitalSignResModel { triageCategory = json['TriageCategory']; gCScore = json['GCScore']; lineItemNo = json['LineItemNo']; - vitalSignDate = json['VitalSignDate'] !=null? DateUtils.convertStringToDate(json['VitalSignDate']): new DateTime.now(); + vitalSignDate = json['VitalSignDate'] !=null? AppDateUtils.convertStringToDate(json['VitalSignDate']): new DateTime.now(); actualTimeTaken = json['ActualTimeTaken']; sugarLevel = json['SugarLevel']; fBS = json['FBS']; diff --git a/lib/screens/doctor/doctor_repaly_chat.dart b/lib/screens/doctor/doctor_repaly_chat.dart index 1c019ca6..14e446e8 100644 --- a/lib/screens/doctor/doctor_repaly_chat.dart +++ b/lib/screens/doctor/doctor_repaly_chat.dart @@ -164,14 +164,14 @@ class DoctorReplayChat extends StatelessWidget { children: [ AppText( - reply.createdOn !=null?DateUtils.getDayMonthYearDateFormatted(DateUtils.getDateTimeFromServerFormat(reply.createdOn)):DateUtils.getDayMonthYearDateFormatted(DateTime.now()), + reply.createdOn !=null?AppDateUtils.getDayMonthYearDateFormatted(AppDateUtils.getDateTimeFromServerFormat(reply.createdOn)):AppDateUtils.getDayMonthYearDateFormatted(DateTime.now()), fontWeight: FontWeight .w600, color: Colors.white, fontSize: 14, ), AppText( - reply.createdOn !=null?DateUtils.getHour(DateUtils.getDateTimeFromServerFormat(reply.createdOn)):DateUtils.getHour(DateTime.now()), + reply.createdOn !=null?AppDateUtils.getHour(AppDateUtils.getDateTimeFromServerFormat(reply.createdOn)):AppDateUtils.getHour(DateTime.now()), fontSize: 14, fontFamily: 'Poppins', color: Colors.white, diff --git a/lib/screens/doctor/patient_arrival_screen.dart b/lib/screens/doctor/patient_arrival_screen.dart index 3b1467d2..e8e155b0 100644 --- a/lib/screens/doctor/patient_arrival_screen.dart +++ b/lib/screens/doctor/patient_arrival_screen.dart @@ -24,9 +24,9 @@ class _PatientArrivalScreen extends State PatientMobileNumber: "0", PatientIdentificationID: "0", PatientID: 0, - From: DateUtils.convertDateToFormat(DateTime.now(), 'yyyy-MM-dd') + From: AppDateUtils.convertDateToFormat(DateTime.now(), 'yyyy-MM-dd') .toString(), - To: DateUtils.convertDateToFormat(DateTime.now(), 'yyyy-MM-dd') + To: AppDateUtils.convertDateToFormat(DateTime.now(), 'yyyy-MM-dd') .toString(), LanguageID: 2, stamp: "2020-03-02T13:56:39.170Z", diff --git a/lib/screens/home/home_screen.dart b/lib/screens/home/home_screen.dart index 39fc7a8c..daddd788 100644 --- a/lib/screens/home/home_screen.dart +++ b/lib/screens/home/home_screen.dart @@ -959,11 +959,11 @@ class _HomeScreenState extends State { PatientID: 0, From: isInpatient == true ? '0' - : DateUtils.convertDateToFormat(DateTime.now(), 'yyyy-MM-dd') + : AppDateUtils.convertDateToFormat(DateTime.now(), 'yyyy-MM-dd') .toString(), To: isInpatient == true ? '0' - : DateUtils.convertDateToFormat(DateTime.now(), 'yyyy-MM-dd') + : AppDateUtils.convertDateToFormat(DateTime.now(), 'yyyy-MM-dd') .toString(), LanguageID: 2, stamp: "2020-03-02T13:56:39.170Z", diff --git a/lib/screens/medical-file/medical_file_details.dart b/lib/screens/medical-file/medical_file_details.dart index 828210e0..dda0925f 100644 --- a/lib/screens/medical-file/medical_file_details.dart +++ b/lib/screens/medical-file/medical_file_details.dart @@ -113,7 +113,7 @@ class _MedicalFileDetailsState extends State { isMedicalFile: true, episode: episode, vistDate: - '${DateUtils.getDayMonthYearDateFormatted(DateUtils.getDateTimeFromServerFormat( + '${AppDateUtils.getDayMonthYearDateFormatted(AppDateUtils.getDateTimeFromServerFormat( vistDate, ), isArabic: projectViewModel.isArabic)}', ), @@ -620,7 +620,7 @@ class _MedicalFileDetailsState extends State { 'Order Date: ', ), AppText( - DateUtils.getDateFormatted( + AppDateUtils.getDateFormatted( DateTime .parse( model diff --git a/lib/screens/medical-file/medical_file_page.dart b/lib/screens/medical-file/medical_file_page.dart index f0ee6445..41a67ac8 100644 --- a/lib/screens/medical-file/medical_file_page.dart +++ b/lib/screens/medical-file/medical_file_page.dart @@ -166,7 +166,7 @@ class _MedicalFilePageState extends State { .timelines[index] .doctorImage, appointmentDate: - DateUtils.getDateTimeFromServerFormat( + AppDateUtils.getDateTimeFromServerFormat( model.medicalFileList[0].entityList[0] .timelines[index].date, ), diff --git a/lib/screens/patients/DischargedPatientPage.dart b/lib/screens/patients/DischargedPatientPage.dart index 0e61702d..011b628e 100644 --- a/lib/screens/patients/DischargedPatientPage.dart +++ b/lib/screens/patients/DischargedPatientPage.dart @@ -270,7 +270,7 @@ class _DischargedPatientState extends State { style: TextStyle(fontSize: 14)), new TextSpan( text: model.filterData[index].admissionDate == null ? "" - : "${DateUtils.convertDateFromServerFormat(model.filterData[index].admissionDate.toString(), 'yyyy-MM-dd')}", + : "${AppDateUtils.convertDateFromServerFormat(model.filterData[index].admissionDate.toString(), 'yyyy-MM-dd')}", style: TextStyle( fontWeight: FontWeight.w700, fontSize: 15)), @@ -294,7 +294,7 @@ class _DischargedPatientState extends State { style: TextStyle(fontSize: 14)), new TextSpan( text: model.filterData[index].dischargeDate == null ? "" - : "${DateUtils.convertDateFromServerFormat(model.filterData[index].dischargeDate.toString(), 'yyyy-MM-dd')}", + : "${AppDateUtils.convertDateFromServerFormat(model.filterData[index].dischargeDate.toString(), 'yyyy-MM-dd')}", style: TextStyle( fontWeight: FontWeight.w700, fontSize: 15)), @@ -309,7 +309,7 @@ class _DischargedPatientState extends State { fontSize: 14,fontWeight: FontWeight.w300, ), AppText( - "${DateTime.now().difference(DateUtils.getDateTimeFromServerFormat(model.filterData[index].admissionDate)).inDays + 1}", + "${DateTime.now().difference(AppDateUtils.getDateTimeFromServerFormat(model.filterData[index].admissionDate)).inDays + 1}", fontSize: 15, fontWeight: FontWeight.w700), ], diff --git a/lib/screens/patients/ECGPage.dart b/lib/screens/patients/ECGPage.dart index 6d1b5370..33692628 100644 --- a/lib/screens/patients/ECGPage.dart +++ b/lib/screens/patients/ECGPage.dart @@ -100,8 +100,8 @@ class ECGPage extends StatelessWidget { child: Column( crossAxisAlignment: CrossAxisAlignment.end, children: [ - AppText('${DateUtils.getDayMonthYearDateFormatted(model.patientMuseResultsModelList[index].createdOnDateTime,isArabic: projectViewModel.isArabic)}',color: Colors.black,fontWeight: FontWeight.w600,fontSize: 14,), - AppText('${DateUtils.getHour(model.patientMuseResultsModelList[index].createdOnDateTime)}',fontWeight: FontWeight.w600,color: Colors.grey[700],fontSize: 14,), + AppText('${AppDateUtils.getDayMonthYearDateFormatted(model.patientMuseResultsModelList[index].createdOnDateTime,isArabic: projectViewModel.isArabic)}',color: Colors.black,fontWeight: FontWeight.w600,fontSize: 14,), + AppText('${AppDateUtils.getHour(model.patientMuseResultsModelList[index].createdOnDateTime)}',fontWeight: FontWeight.w600,color: Colors.grey[700],fontSize: 14,), ], ), ), diff --git a/lib/screens/patients/ReferralDischargedPatientDetails.dart b/lib/screens/patients/ReferralDischargedPatientDetails.dart index b0ec6105..63923ecc 100644 --- a/lib/screens/patients/ReferralDischargedPatientDetails.dart +++ b/lib/screens/patients/ReferralDischargedPatientDetails.dart @@ -75,8 +75,8 @@ class ReferralDischargedPatientDetails extends StatelessWidget { "patientType": "1", "isInpatient": true, "arrivalType": "1", - "from": DateUtils.convertDateToFormat(DateTime.now(), 'yyyy-MM-dd'), - "to": DateUtils.convertDateToFormat(DateTime.now(), 'yyyy-MM-dd'), + "from": AppDateUtils.convertDateToFormat(DateTime.now(), 'yyyy-MM-dd'), + "to": AppDateUtils.convertDateToFormat(DateTime.now(), 'yyyy-MM-dd'), }); }, child: Icon( @@ -123,7 +123,7 @@ class ReferralDischargedPatientDetails extends StatelessWidget { : Colors.red[700], ), AppText( - DateUtils.getDayMonthYearDateFormatted(referredPatient.referralDate,), + AppDateUtils.getDayMonthYearDateFormatted(referredPatient.referralDate,), fontFamily: 'Poppins', fontWeight: FontWeight.w600, fontSize: 2.0 * SizeConfig.textMultiplier, @@ -145,7 +145,7 @@ class ReferralDischargedPatientDetails extends StatelessWidget { ), Expanded( child: AppText( - DateUtils.convertDateFromServerFormat( + AppDateUtils.convertDateFromServerFormat( referredPatient.admissionDate, "dd MMM,yyyy"), fontFamily: 'Poppins', @@ -170,7 +170,7 @@ class ReferralDischargedPatientDetails extends StatelessWidget { ), Expanded( child: AppText( - DateUtils.convertDateFromServerFormat( + AppDateUtils.convertDateFromServerFormat( referredPatient.dischargeDate, "dd MMM,yyyy"), fontFamily: 'Poppins', @@ -195,7 +195,7 @@ class ReferralDischargedPatientDetails extends StatelessWidget { ), Expanded( child: AppText( - DateUtils.convertDateFromServerFormat( + AppDateUtils.convertDateFromServerFormat( referredPatient.dischargeDate, "dd MMM,yyyy"), fontFamily: 'Poppins', @@ -439,7 +439,7 @@ class ReferralDischargedPatientDetails extends StatelessWidget { ), Expanded( child: AppText( - DateUtils.convertDateFromServerFormat( + AppDateUtils.convertDateFromServerFormat( referredPatient.mAXResponseTime, "dd MMM,yyyy"), fontFamily: 'Poppins', diff --git a/lib/screens/patients/ReferralDischargedPatientPage.dart b/lib/screens/patients/ReferralDischargedPatientPage.dart index 6da969d1..0705fddd 100644 --- a/lib/screens/patients/ReferralDischargedPatientPage.dart +++ b/lib/screens/patients/ReferralDischargedPatientPage.dart @@ -67,8 +67,8 @@ class _ReferralDischargedPatientPageState extends State { ), Expanded( child: AppText( - '${DateUtils.getDayMonthYearDateFormatted(DateUtils.getDateTimeFromServerFormat(model.insuranceApprovalInPatient[indexInsurance].receiptOn), isArabic: projectViewModel.isArabic)}', + '${AppDateUtils.getDayMonthYearDateFormatted(AppDateUtils.getDateTimeFromServerFormat(model.insuranceApprovalInPatient[indexInsurance].receiptOn), isArabic: projectViewModel.isArabic)}', color: Colors.black, fontWeight: FontWeight.w600, @@ -273,7 +273,7 @@ class _InsuranceApprovalsDetailsState extends State { color: Colors.grey[500], ), AppText( - '${DateUtils.getDayMonthYearDateFormatted(DateUtils.getDateTimeFromServerFormat(model.insuranceApprovalInPatient[indexInsurance].expiryDate), isArabic: projectViewModel.isArabic)}', + '${AppDateUtils.getDayMonthYearDateFormatted(AppDateUtils.getDateTimeFromServerFormat(model.insuranceApprovalInPatient[indexInsurance].expiryDate), isArabic: projectViewModel.isArabic)}', color: Colors.black, fontWeight: FontWeight.w600, @@ -614,7 +614,7 @@ class _InsuranceApprovalsDetailsState extends State { ), Expanded( child: AppText( - '${DateUtils.getDayMonthYearDateFormatted(DateUtils.getDateTimeFromServerFormat(model.insuranceApproval[indexInsurance].rceiptOn), isArabic: projectViewModel.isArabic)}', + '${AppDateUtils.getDayMonthYearDateFormatted(AppDateUtils.getDateTimeFromServerFormat(model.insuranceApproval[indexInsurance].rceiptOn), isArabic: projectViewModel.isArabic)}', color: Colors.black, fontWeight: FontWeight.w600, @@ -630,7 +630,7 @@ class _InsuranceApprovalsDetailsState extends State { ), if(model.insuranceApproval[indexInsurance].expiryDate!=null) AppText( - '${DateUtils.getDayMonthYearDateFormatted(DateUtils.getDateTimeFromServerFormat(model.insuranceApproval[indexInsurance].expiryDate), isArabic: projectViewModel.isArabic)}', + '${AppDateUtils.getDayMonthYearDateFormatted(AppDateUtils.getDateTimeFromServerFormat(model.insuranceApproval[indexInsurance].expiryDate), isArabic: projectViewModel.isArabic)}', color: Colors.black, fontWeight: FontWeight.w600, diff --git a/lib/screens/patients/patients_screen.dart b/lib/screens/patients/patients_screen.dart index 95cf80f5..92648ffc 100644 --- a/lib/screens/patients/patients_screen.dart +++ b/lib/screens/patients/patients_screen.dart @@ -90,9 +90,9 @@ class _PatientsScreenState extends State { PatientMobileNumber: "0", PatientIdentificationID: "0", PatientID: 0, - From: DateUtils.convertDateToFormat(DateTime.now(), 'yyyy-MM-dd') + From: AppDateUtils.convertDateToFormat(DateTime.now(), 'yyyy-MM-dd') .toString(), - To: DateUtils.convertDateToFormat(DateTime.now(), 'yyyy-MM-dd') + To: AppDateUtils.convertDateToFormat(DateTime.now(), 'yyyy-MM-dd') .toString(), LanguageID: 2, stamp: "2020-03-02T13:56:39.170Z", @@ -861,30 +861,30 @@ class _PatientsScreenState extends State { filterPatient(item, model) { if (item == 'Tomorrow') { - _patientSearchFormValues.To = DateUtils.convertDateToFormat( + _patientSearchFormValues.To = AppDateUtils.convertDateToFormat( DateTime(DateTime.now().year, DateTime.now().month, DateTime.now().day + 1), 'yyyy-MM-dd'); - _patientSearchFormValues.From = DateUtils.convertDateToFormat( + _patientSearchFormValues.From = AppDateUtils.convertDateToFormat( DateTime(DateTime.now().year, DateTime.now().month, DateTime.now().day + 1), 'yyyy-MM-dd'); } else if (item == 'Next Week') { - _patientSearchFormValues.From = DateUtils.convertDateToFormat( + _patientSearchFormValues.From = AppDateUtils.convertDateToFormat( DateTime(DateTime.now().year, DateTime.now().month, DateTime.now().day + 1), 'yyyy-MM-dd'); - _patientSearchFormValues.To = DateUtils.convertDateToFormat( + _patientSearchFormValues.To = AppDateUtils.convertDateToFormat( DateTime(DateTime.now().year, DateTime.now().month, DateTime.now().day + 6), 'yyyy-MM-dd'); } else { - _patientSearchFormValues.From = DateUtils.convertDateToFormat( + _patientSearchFormValues.From = AppDateUtils.convertDateToFormat( DateTime( DateTime.now().year, DateTime.now().month, DateTime.now().day), 'yyyy-MM-dd'); - _patientSearchFormValues.To = DateUtils.convertDateToFormat( + _patientSearchFormValues.To = AppDateUtils.convertDateToFormat( DateTime( DateTime.now().year, DateTime.now().month, DateTime.now().day), 'yyyy-MM-dd'); diff --git a/lib/screens/patients/profile/admission-request/admission-request-detail-screen.dart b/lib/screens/patients/profile/admission-request/admission-request-detail-screen.dart index 20a93ff6..bbc968b0 100644 --- a/lib/screens/patients/profile/admission-request/admission-request-detail-screen.dart +++ b/lib/screens/patients/profile/admission-request/admission-request-detail-screen.dart @@ -96,7 +96,7 @@ class _AdmissionRequestDetailScreenState Helpers.textFieldSelectorDecoration( TranslationBase.of(context).date, selectedDate != null - ? "${DateUtils.convertStringToDateFormat(selectedDate.toString(), "yyyy-MM-dd")}" + ? "${AppDateUtils.convertStringToDateFormat(selectedDate.toString(), "yyyy-MM-dd")}" : null, true, suffixIcon: Icon( diff --git a/lib/screens/patients/profile/admission-request/admission-request_second-screen.dart b/lib/screens/patients/profile/admission-request/admission-request_second-screen.dart index 05a43460..cb4395d0 100644 --- a/lib/screens/patients/profile/admission-request/admission-request_second-screen.dart +++ b/lib/screens/patients/profile/admission-request/admission-request_second-screen.dart @@ -197,7 +197,7 @@ class _AdmissionRequestSecondScreenState hintText: TranslationBase.of(context) .expectedAdmissionDate, dropDownText: _expectedAdmissionDate != null - ? "${DateUtils.convertStringToDateFormat(_expectedAdmissionDate.toString(), "yyyy-MM-dd")}" + ? "${AppDateUtils.convertStringToDateFormat(_expectedAdmissionDate.toString(), "yyyy-MM-dd")}" : null, enabled: false, isTextFieldHasSuffix: true, diff --git a/lib/screens/patients/profile/lab_result/Lab_Result_details_wideget.dart b/lib/screens/patients/profile/lab_result/Lab_Result_details_wideget.dart index 112680e8..697d16d2 100644 --- a/lib/screens/patients/profile/lab_result/Lab_Result_details_wideget.dart +++ b/lib/screens/patients/profile/lab_result/Lab_Result_details_wideget.dart @@ -87,14 +87,14 @@ class _VitalSignDetailsWidgetState extends State { List fullData(ProjectViewModel projectViewModel) { List tableRow = []; widget.labResult.forEach((vital) { - var date = DateUtils.convertStringToDate(vital.verifiedOnDateTime); + var date = AppDateUtils.convertStringToDate(vital.verifiedOnDateTime); tableRow.add(TableRow(children: [ Container( child: Container( padding: EdgeInsets.all(8), color: Colors.white, child: AppText( - '${projectViewModel.isArabic? DateUtils.getWeekDayArabic(date.weekday): DateUtils.getWeekDay(date.weekday)} ,${date.day} ${projectViewModel.isArabic? DateUtils.getMonthArabic(date.month) : DateUtils.getMonth(date.month)} ${date.year}', + '${projectViewModel.isArabic? AppDateUtils.getWeekDayArabic(date.weekday): AppDateUtils.getWeekDay(date.weekday)} ,${date.day} ${projectViewModel.isArabic? AppDateUtils.getMonthArabic(date.month) : AppDateUtils.getMonth(date.month)} ${date.year}', fontSize: SizeConfig.textMultiplier * 1.8, fontWeight: FontWeight.w600, diff --git a/lib/screens/patients/profile/lab_result/LineChartCurved.dart b/lib/screens/patients/profile/lab_result/LineChartCurved.dart index d0e61c10..25d10771 100644 --- a/lib/screens/patients/profile/lab_result/LineChartCurved.dart +++ b/lib/screens/patients/profile/lab_result/LineChartCurved.dart @@ -105,7 +105,7 @@ class LineChartCurvedState extends State { rotateAngle:-65, getTitles: (value) { print(value); - DateTime date = DateUtils.convertStringToDate(widget.labResult[value.toInt()].verifiedOnDateTime); + DateTime date = AppDateUtils.convertStringToDate(widget.labResult[value.toInt()].verifiedOnDateTime); if (widget.labResult.length < 8) { if (widget.labResult.length > value.toInt()) { return '${date.day}/ ${date.year}'; diff --git a/lib/screens/patients/profile/note/progress_note_screen.dart b/lib/screens/patients/profile/note/progress_note_screen.dart index 443bff8d..78e055ff 100644 --- a/lib/screens/patients/profile/note/progress_note_screen.dart +++ b/lib/screens/patients/profile/note/progress_note_screen.dart @@ -456,13 +456,13 @@ class _ProgressNoteState extends State { index] .createdOn != null - ? DateUtils.getDayMonthYearDateFormatted( - DateUtils.getDateTimeFromServerFormat( + ? AppDateUtils.getDayMonthYearDateFormatted( + AppDateUtils.getDateTimeFromServerFormat( model .patientProgressNoteList[ index] .createdOn)) - : DateUtils + : AppDateUtils .getDayMonthYearDateFormatted( DateTime.now()), fontWeight: FontWeight.w600, @@ -474,13 +474,13 @@ class _ProgressNoteState extends State { index] .createdOn != null - ? DateUtils.getHour(DateUtils + ? AppDateUtils.getHour(AppDateUtils .getDateTimeFromServerFormat( model .patientProgressNoteList[ index] .createdOn)) - : DateUtils.getHour( + : AppDateUtils.getHour( DateTime.now()), fontWeight: FontWeight.w600, fontSize: 14, @@ -530,7 +530,7 @@ class _ProgressNoteState extends State { showMyDialog({BuildContext context, Function confirmFun, String actionName}) { showDialog( context: context, - child: Center( + builder: (ctx) => Center( child: Container( width: MediaQuery .of(context) @@ -606,7 +606,8 @@ class _ProgressNoteState extends State { ), ), ), - )); + ) + ); } diff --git a/lib/screens/patients/profile/prescriptions/in_patient_prescription_details_screen.dart b/lib/screens/patients/profile/prescriptions/in_patient_prescription_details_screen.dart index a7aab586..ca8be2c0 100644 --- a/lib/screens/patients/profile/prescriptions/in_patient_prescription_details_screen.dart +++ b/lib/screens/patients/profile/prescriptions/in_patient_prescription_details_screen.dart @@ -96,11 +96,11 @@ class _InpatientPrescriptionDetailsScreenState key: 'UOM'), buildTableRow( des: - '${DateUtils.getDate(prescription.startDatetime)}', + '${AppDateUtils.getDate(prescription.startDatetime)}', key: 'Start Date'), buildTableRow( des: - '${DateUtils.getDate(prescription.stopDatetime)}', + '${AppDateUtils.getDate(prescription.stopDatetime)}', key: 'Stop Date'), buildTableRow( des: '${prescription.noOfDoses}', @@ -115,7 +115,7 @@ class _InpatientPrescriptionDetailsScreenState key: 'Pharmacy Remarks'), buildTableRow( des: - '${DateUtils.getDate(prescription.prescriptionDatetime)}', + '${AppDateUtils.getDate(prescription.prescriptionDatetime)}', key: 'Prescription Date'), buildTableRow( des: '${prescription.refillID}', diff --git a/lib/screens/patients/profile/referral/my-referral-detail-screen.dart b/lib/screens/patients/profile/referral/my-referral-detail-screen.dart index 71edabb6..2adef799 100644 --- a/lib/screens/patients/profile/referral/my-referral-detail-screen.dart +++ b/lib/screens/patients/profile/referral/my-referral-detail-screen.dart @@ -30,10 +30,10 @@ class MyReferralDetailScreen extends StatelessWidget { return BaseView( onModelReady: (model) => model.getPatientDetails( - DateUtils.convertStringToDateFormat( + AppDateUtils.convertStringToDateFormat( DateTime.now() /*.subtract(Duration(days: 350))*/ .toString(), "yyyy-MM-dd"), - DateUtils.convertStringToDateFormat( + AppDateUtils.convertStringToDateFormat( DateTime.now().toString(), "yyyy-MM-dd"), pendingReferral.patientID, pendingReferral.sourceAppointmentNo), diff --git a/lib/screens/patients/profile/referral/my-referral-inpatient-screen.dart b/lib/screens/patients/profile/referral/my-referral-inpatient-screen.dart index f3bbf698..fcbd11b7 100644 --- a/lib/screens/patients/profile/referral/my-referral-inpatient-screen.dart +++ b/lib/screens/patients/profile/referral/my-referral-inpatient-screen.dart @@ -64,8 +64,8 @@ class MyReferralInPatientScreen extends StatelessWidget { referralStatusCode: model.myReferralPatients[index].referralStatus, patientName: model.myReferralPatients[index].patientName, patientGender: model.myReferralPatients[index].gender, - referredDate: DateUtils.getDayMonthYearDateFormatted(model.myReferralPatients[index].referralDate), - referredTime: DateUtils.getTimeHHMMA(model.myReferralPatients[index].referralDate), + referredDate: AppDateUtils.getDayMonthYearDateFormatted(model.myReferralPatients[index].referralDate), + referredTime: AppDateUtils.getTimeHHMMA(model.myReferralPatients[index].referralDate), patientID: "${model.myReferralPatients[index].patientID}", isSameBranch: false, isReferral: true, diff --git a/lib/screens/patients/profile/referral/refer-patient-screen.dart b/lib/screens/patients/profile/referral/refer-patient-screen.dart index 2d9ca8dc..6a25b9a1 100644 --- a/lib/screens/patients/profile/referral/refer-patient-screen.dart +++ b/lib/screens/patients/profile/referral/refer-patient-screen.dart @@ -434,7 +434,7 @@ class _PatientMakeReferralScreenState extends State { height: screenSize.height * 0.075, hintText: TranslationBase.of(context).date, dropDownText: appointmentDate != null - ? "${DateUtils.convertDateToFormat(appointmentDate, "yyyy-MM-dd")}" + ? "${AppDateUtils.convertDateToFormat(appointmentDate, "yyyy-MM-dd")}" : null, enabled: false, isTextFieldHasSuffix: true, diff --git a/lib/screens/patients/profile/referral/referral_patient_detail_in-paint.dart b/lib/screens/patients/profile/referral/referral_patient_detail_in-paint.dart index cc2c7136..2a0407aa 100644 --- a/lib/screens/patients/profile/referral/referral_patient_detail_in-paint.dart +++ b/lib/screens/patients/profile/referral/referral_patient_detail_in-paint.dart @@ -76,8 +76,8 @@ class ReferralPatientDetailScreen extends StatelessWidget { "patientType": "1", "isInpatient": true, "arrivalType": "1", - "from": DateUtils.convertDateToFormat(DateTime.now(), 'yyyy-MM-dd'), - "to": DateUtils.convertDateToFormat(DateTime.now(), 'yyyy-MM-dd'), + "from": AppDateUtils.convertDateToFormat(DateTime.now(), 'yyyy-MM-dd'), + "to": AppDateUtils.convertDateToFormat(DateTime.now(), 'yyyy-MM-dd'), }); }, child: Icon( @@ -102,8 +102,8 @@ class ReferralPatientDetailScreen extends StatelessWidget { "patientType": "1", "isInpatient": true, "arrivalType": "1", - "from": DateUtils.convertDateToFormat(DateTime.now(), 'yyyy-MM-dd'), - "to": DateUtils.convertDateToFormat(DateTime.now(), 'yyyy-MM-dd'), + "from": AppDateUtils.convertDateToFormat(DateTime.now(), 'yyyy-MM-dd'), + "to": AppDateUtils.convertDateToFormat(DateTime.now(), 'yyyy-MM-dd'), }); }, child: Padding( @@ -153,7 +153,7 @@ class ReferralPatientDetailScreen extends StatelessWidget { : Colors.red[700], ), AppText( - DateUtils.getDayMonthYearDateFormatted(referredPatient.referralDate,), + AppDateUtils.getDayMonthYearDateFormatted(referredPatient.referralDate,), fontFamily: 'Poppins', fontWeight: FontWeight.w600, fontSize: 2.0 * SizeConfig.textMultiplier, @@ -189,7 +189,7 @@ class ReferralPatientDetailScreen extends StatelessWidget { ], ), AppText( - DateUtils.getTimeHHMMA(referredPatient.referralDate,), + AppDateUtils.getTimeHHMMA(referredPatient.referralDate,), fontFamily: 'Poppins', fontWeight: FontWeight.w600, fontSize: 1.8 * SizeConfig.textMultiplier, @@ -333,7 +333,7 @@ class ReferralPatientDetailScreen extends StatelessWidget { ), Expanded( child: AppText( - DateUtils.convertDateFromServerFormat( + AppDateUtils.convertDateFromServerFormat( referredPatient.mAXResponseTime, "dd MMM,yyyy"), fontFamily: 'Poppins', diff --git a/lib/screens/patients/profile/referral/referred-patient-screen.dart b/lib/screens/patients/profile/referral/referred-patient-screen.dart index ceb35929..a4027e00 100644 --- a/lib/screens/patients/profile/referral/referred-patient-screen.dart +++ b/lib/screens/patients/profile/referral/referred-patient-screen.dart @@ -75,12 +75,12 @@ class ReferredPatientScreen extends StatelessWidget { "${model.getReferredPatientItem(index).firstName} ${model.getReferredPatientItem(index).middleName} ${model.getReferredPatientItem(index).lastName}", patientGender: model.getReferredPatientItem(index).gender, - referredDate: DateUtils.convertDateFromServerFormat( + referredDate: AppDateUtils.convertDateFromServerFormat( model .getReferredPatientItem(index) .referralDate, "dd/MM/yyyy"), - referredTime: DateUtils.convertDateFromServerFormat( + referredTime: AppDateUtils.convertDateFromServerFormat( model .getReferredPatientItem(index) .referralDate, diff --git a/lib/screens/patients/profile/referral/referred_patient_detail_in-paint.dart b/lib/screens/patients/profile/referral/referred_patient_detail_in-paint.dart index 07c4b38e..a5c62248 100644 --- a/lib/screens/patients/profile/referral/referred_patient_detail_in-paint.dart +++ b/lib/screens/patients/profile/referral/referred_patient_detail_in-paint.dart @@ -76,9 +76,9 @@ class ReferredPatientDetailScreen extends StatelessWidget { "patientType": "1", "isInpatient": true, "arrivalType": "1", - "from": DateUtils.convertDateToFormat( + "from": AppDateUtils.convertDateToFormat( DateTime.now(), 'yyyy-MM-dd'), - "to": DateUtils.convertDateToFormat( + "to": AppDateUtils.convertDateToFormat( DateTime.now(), 'yyyy-MM-dd'), }); }, @@ -102,9 +102,9 @@ class ReferredPatientDetailScreen extends StatelessWidget { "patientType": "1", "isInpatient": true, "arrivalType": "1", - "from": DateUtils.convertDateToFormat( + "from": AppDateUtils.convertDateToFormat( DateTime.now(), 'yyyy-MM-dd'), - "to": DateUtils.convertDateToFormat( + "to": AppDateUtils.convertDateToFormat( DateTime.now(), 'yyyy-MM-dd'), }); }, @@ -157,7 +157,7 @@ class ReferredPatientDetailScreen extends StatelessWidget { : Colors.red[700], ), AppText( - DateUtils.convertDateFromServerFormat( + AppDateUtils.convertDateFromServerFormat( referredPatient.referralDate, "dd MMM,yyyy"), fontFamily: 'Poppins', @@ -194,7 +194,7 @@ class ReferredPatientDetailScreen extends StatelessWidget { ], ), AppText( - DateUtils.convertDateFromServerFormat( + AppDateUtils.convertDateFromServerFormat( referredPatient.referralDate, "hh:mm a"), fontFamily: 'Poppins', @@ -337,7 +337,7 @@ class ReferredPatientDetailScreen extends StatelessWidget { ), Expanded( child: AppText( - DateUtils.convertDateFromServerFormat( + AppDateUtils.convertDateFromServerFormat( referredPatient.mAXResponseTime, "dd MMM,yyyy"), fontFamily: 'Poppins', diff --git a/lib/screens/patients/profile/soap_update/assessment/update_assessment_page.dart b/lib/screens/patients/profile/soap_update/assessment/update_assessment_page.dart index bea229bb..bdf55541 100644 --- a/lib/screens/patients/profile/soap_update/assessment/update_assessment_page.dart +++ b/lib/screens/patients/profile/soap_update/assessment/update_assessment_page.dart @@ -389,12 +389,12 @@ class _UpdateAssessmentPageState extends State { children: [ AppText( assessment.createdOn != null - ? DateUtils + ? AppDateUtils .getDayMonthYearDateFormatted( DateTime.parse( assessment .createdOn)) - : DateUtils + : AppDateUtils .getDayMonthYearDateFormatted( DateTime.now()), fontWeight: FontWeight @@ -402,11 +402,11 @@ class _UpdateAssessmentPageState extends State { fontSize: 14, ), AppText( assessment.createdOn != null - ? DateUtils.getHour( + ? AppDateUtils.getHour( DateTime.parse( assessment .createdOn)) - : DateUtils.getHour( + : AppDateUtils.getHour( DateTime.now()), fontWeight: FontWeight .w600, diff --git a/lib/screens/patients/profile/soap_update/plan/update_plan_page.dart b/lib/screens/patients/profile/soap_update/plan/update_plan_page.dart index 55b86022..5b26dfe3 100644 --- a/lib/screens/patients/profile/soap_update/plan/update_plan_page.dart +++ b/lib/screens/patients/profile/soap_update/plan/update_plan_page.dart @@ -169,7 +169,7 @@ class _UpdatePlanPageState extends State { ], ), AppText( - widget.patientProgressNote.createdOn !=null?DateUtils.getDayMonthYearDateFormatted(DateTime.parse(widget.patientProgressNote.createdOn)):DateUtils.getDayMonthYearDateFormatted(DateTime.now()), + widget.patientProgressNote.createdOn !=null?AppDateUtils.getDayMonthYearDateFormatted(DateTime.parse(widget.patientProgressNote.createdOn)):AppDateUtils.getDayMonthYearDateFormatted(DateTime.now()), fontWeight: FontWeight .w600, fontSize: 14, @@ -192,7 +192,7 @@ class _UpdatePlanPageState extends State { ], ), AppText( - widget.patientProgressNote.createdOn !=null?DateUtils.getHour(DateTime.parse(widget.patientProgressNote.createdOn)):DateUtils.getHour(DateTime.now()), + widget.patientProgressNote.createdOn !=null?AppDateUtils.getHour(DateTime.parse(widget.patientProgressNote.createdOn)):AppDateUtils.getHour(DateTime.now()), fontWeight: FontWeight.w600, fontSize: 14, ) diff --git a/lib/screens/patients/profile/vital_sign/vital_sign_detail_pain_scale.dart b/lib/screens/patients/profile/vital_sign/vital_sign_detail_pain_scale.dart index ef6bc48f..ffd8422d 100644 --- a/lib/screens/patients/profile/vital_sign/vital_sign_detail_pain_scale.dart +++ b/lib/screens/patients/profile/vital_sign/vital_sign_detail_pain_scale.dart @@ -251,7 +251,7 @@ class VitalSignDetailPainScale extends StatelessWidget { padding: EdgeInsets.all(8), child: Center( child: AppText( - "${DateUtils.convertDateFromServerFormat(vitalList[index].createdOn, "E , dd MMM, yyyy hh:mm a")}", + "${AppDateUtils.convertDateFromServerFormat(vitalList[index].createdOn, "E , dd MMM, yyyy hh:mm a")}", fontWeight: FontWeight.w700, color: Color(0XFF28353E), fontSize: SizeConfig.textMultiplier * 1.6, diff --git a/lib/screens/patients/profile/vital_sign/vital_sign_details_blood_pressurewideget.dart b/lib/screens/patients/profile/vital_sign/vital_sign_details_blood_pressurewideget.dart index a6170f6f..1e593af7 100644 --- a/lib/screens/patients/profile/vital_sign/vital_sign_details_blood_pressurewideget.dart +++ b/lib/screens/patients/profile/vital_sign/vital_sign_details_blood_pressurewideget.dart @@ -154,7 +154,7 @@ class _VitalSignDetailsWidgetState extends State { widget.vitalList.forEach((vital) { var data = vital.toJson()[widget.viewKey1]; DateTime elementDate = - DateUtils.getDateTimeFromServerFormat(vital.createdOn); + AppDateUtils.getDateTimeFromServerFormat(vital.createdOn); if (data != 0) tableRow.add(TableRow(children: [ Container( @@ -162,7 +162,7 @@ class _VitalSignDetailsWidgetState extends State { padding: EdgeInsets.all(10), color: Colors.white, child: AppText( - '${projectViewModel.isArabic ? DateUtils.getWeekDayArabic(elementDate.weekday) : DateUtils.getWeekDay(elementDate.weekday)}, ${elementDate.day} ${projectViewModel.isArabic ? DateUtils.getMonthArabic(elementDate.month) : DateUtils.getMonth(elementDate.month)}, ${elementDate.year} ${DateUtils.getHour(elementDate)}', + '${projectViewModel.isArabic ? AppDateUtils.getWeekDayArabic(elementDate.weekday) : AppDateUtils.getWeekDay(elementDate.weekday)}, ${elementDate.day} ${projectViewModel.isArabic ? AppDateUtils.getMonthArabic(elementDate.month) : AppDateUtils.getMonth(elementDate.month)}, ${elementDate.year} ${AppDateUtils.getHour(elementDate)}', // textAlign: TextAlign.center, fontSize: SizeConfig.textMultiplier * 1.6, fontWeight: FontWeight.w600, diff --git a/lib/screens/patients/profile/vital_sign/vital_sign_details_wideget.dart b/lib/screens/patients/profile/vital_sign/vital_sign_details_wideget.dart index f058ac3e..cec53580 100644 --- a/lib/screens/patients/profile/vital_sign/vital_sign_details_wideget.dart +++ b/lib/screens/patients/profile/vital_sign/vital_sign_details_wideget.dart @@ -111,7 +111,7 @@ class _VitalSignDetailsWidgetState extends State { widget.vitalList.forEach((vital) { var data = vital.toJson()[widget.viewKey]; DateTime elementDate = - DateUtils.getDateTimeFromServerFormat(vital.createdOn); + AppDateUtils.getDateTimeFromServerFormat(vital.createdOn); if (data != 0) tableRow.add(TableRow(children: [ Container( @@ -119,7 +119,7 @@ class _VitalSignDetailsWidgetState extends State { padding: EdgeInsets.all(8), color: Colors.white, child: AppText( - '${projectViewModel.isArabic ? DateUtils.getWeekDayArabic(elementDate.weekday) : DateUtils.getWeekDay(elementDate.weekday)}, ${elementDate.day} ${projectViewModel.isArabic ? DateUtils.getMonthArabic(elementDate.month) : DateUtils.getMonth(elementDate.month)}, ${elementDate.year} ${DateUtils.getHour(elementDate)}', + '${projectViewModel.isArabic ? AppDateUtils.getWeekDayArabic(elementDate.weekday) : AppDateUtils.getWeekDay(elementDate.weekday)}, ${elementDate.day} ${projectViewModel.isArabic ? AppDateUtils.getMonthArabic(elementDate.month) : AppDateUtils.getMonth(elementDate.month)}, ${elementDate.year} ${AppDateUtils.getHour(elementDate)}', // textAlign: TextAlign.center, fontSize: SizeConfig.textMultiplier * 1.8, fontWeight: FontWeight.w600, diff --git a/lib/screens/patients/profile/vital_sign/vital_sing_chart_and_detials.dart b/lib/screens/patients/profile/vital_sign/vital_sing_chart_and_detials.dart index f59f6c23..17b9ebed 100644 --- a/lib/screens/patients/profile/vital_sign/vital_sing_chart_and_detials.dart +++ b/lib/screens/patients/profile/vital_sign/vital_sing_chart_and_detials.dart @@ -101,7 +101,7 @@ class VitalSingChartAndDetials extends StatelessWidget { vitalList.reversed.toList().forEach( (element) { DateTime elementDate = - DateUtils.getDateTimeFromServerFormat(element.createdOn); + AppDateUtils.getDateTimeFromServerFormat(element.createdOn); if (element.toJson()[viewKey] != null && element.toJson()[viewKey]?.toInt() != 0) timeSeriesData.add( diff --git a/lib/screens/patients/profile/vital_sign/vital_sing_chart_blood_pressure.dart b/lib/screens/patients/profile/vital_sign/vital_sing_chart_blood_pressure.dart index ba27a793..ed1f444e 100644 --- a/lib/screens/patients/profile/vital_sign/vital_sing_chart_blood_pressure.dart +++ b/lib/screens/patients/profile/vital_sign/vital_sing_chart_blood_pressure.dart @@ -115,7 +115,7 @@ class VitalSingChartBloodPressure extends StatelessWidget { vitalList.reversed.toList().forEach( (element) { DateTime elementDate = - DateUtils.getDateTimeFromServerFormat(element.createdOn); + AppDateUtils.getDateTimeFromServerFormat(element.createdOn); if (element.toJson()[viewKey1]?.toInt() != 0) timeSeriesData1.add( TimeSeriesSales2( diff --git a/lib/screens/prescription/add_prescription_form.dart b/lib/screens/prescription/add_prescription_form.dart index 2352ae32..1cb6b3f0 100644 --- a/lib/screens/prescription/add_prescription_form.dart +++ b/lib/screens/prescription/add_prescription_form.dart @@ -984,7 +984,7 @@ class _PrescriptionFormWidgetState extends State { context) .date, selectedDate != null - ? "${DateUtils.convertStringToDateFormat(selectedDate.toString(), "yyyy-MM-dd")}" + ? "${AppDateUtils.convertStringToDateFormat(selectedDate.toString(), "yyyy-MM-dd")}" : null, true, suffixIcon: Icon( diff --git a/lib/screens/prescription/prescription_item_in_patient_page.dart b/lib/screens/prescription/prescription_item_in_patient_page.dart index af0f66e5..5c1f4fed 100644 --- a/lib/screens/prescription/prescription_item_in_patient_page.dart +++ b/lib/screens/prescription/prescription_item_in_patient_page.dart @@ -321,7 +321,7 @@ class PrescriptionItemsInPatientPage extends StatelessWidget { ), Expanded( child: AppText( - '${DateUtils.getDayMonthYearDateFormatted(startOn, isArabic: projectViewModel.isArabic)}', + '${AppDateUtils.getDayMonthYearDateFormatted(startOn, isArabic: projectViewModel.isArabic)}', color: Colors.black, fontWeight: FontWeight.w600, fontSize: 14, @@ -337,7 +337,7 @@ class PrescriptionItemsInPatientPage extends StatelessWidget { ), Expanded( child: AppText( - '${DateUtils.getDayMonthYearDateFormatted(stopOn, isArabic: projectViewModel.isArabic)}', + '${AppDateUtils.getDayMonthYearDateFormatted(stopOn, isArabic: projectViewModel.isArabic)}', color: Colors.black, fontWeight: FontWeight.w600, fontSize: 14, diff --git a/lib/screens/prescription/prescription_items_page.dart b/lib/screens/prescription/prescription_items_page.dart index 06d9634c..8051beae 100644 --- a/lib/screens/prescription/prescription_items_page.dart +++ b/lib/screens/prescription/prescription_items_page.dart @@ -34,7 +34,7 @@ class PrescriptionItemsPage extends StatelessWidget { clinic: prescriptions.clinicDescription, branch: prescriptions.name, isPrescriptions: true, - appointmentDate: DateUtils.getDateTimeFromServerFormat(prescriptions.appointmentDate), + appointmentDate: AppDateUtils.getDateTimeFromServerFormat(prescriptions.appointmentDate), doctorName: prescriptions.doctorName, profileUrl: prescriptions.doctorImageURL, ), @@ -75,7 +75,7 @@ class PrescriptionItemsPage extends StatelessWidget { onTap: (){ showDialog( context: context, - child: ShowImageDialog( + builder: (ctx) => ShowImageDialog( imageUrl: model.prescriptionReportEnhList[index].imageSRCUrl, ) ); @@ -164,7 +164,7 @@ class PrescriptionItemsPage extends StatelessWidget { onTap: (){ showDialog( context: context, - child: ShowImageDialog( + builder: (ctx) => ShowImageDialog( imageUrl: model.prescriptionReportEnhList[index].imageSRCUrl, ) ); diff --git a/lib/screens/prescription/prescription_screen.dart b/lib/screens/prescription/prescription_screen.dart index 3b207d5a..6608f108 100644 --- a/lib/screens/prescription/prescription_screen.dart +++ b/lib/screens/prescription/prescription_screen.dart @@ -226,7 +226,7 @@ class _NewPrescriptionScreenState extends State { 13.5, ), AppText( - DateUtils.getMonth(model.prescriptionList[0].entityList[index].createdOn != + AppDateUtils.getMonth(model.prescriptionList[0].entityList[index].createdOn != null ? (DateTime.parse(model.prescriptionList[0].entityList[index].createdOn) .month) @@ -249,7 +249,7 @@ class _NewPrescriptionScreenState extends State { .green, ), AppText( - DateUtils.getTimeFormated(DateTime.parse(model + AppDateUtils.getTimeFormated(DateTime.parse(model .prescriptionList[ 0] .entityList[ @@ -289,7 +289,7 @@ class _NewPrescriptionScreenState extends State { Expanded( child: AppText( - DateUtils.getDateFormatted(DateTime.parse(model + AppDateUtils.getDateFormatted(DateTime.parse(model .prescriptionList[0] .entityList[index] .startDate)), diff --git a/lib/screens/prescription/prescription_screen_history.dart b/lib/screens/prescription/prescription_screen_history.dart index cf038ff6..5ce98c54 100644 --- a/lib/screens/prescription/prescription_screen_history.dart +++ b/lib/screens/prescription/prescription_screen_history.dart @@ -125,7 +125,7 @@ class _NewPrescriptionHistoryScreenState 13.5, ), AppText( - DateUtils.getMonth(model.prescriptionList[0].entityList[index].createdOn != + AppDateUtils.getMonth(model.prescriptionList[0].entityList[index].createdOn != null ? (DateTime.parse(model.prescriptionList[0].entityList[index].createdOn) .month) @@ -148,7 +148,7 @@ class _NewPrescriptionHistoryScreenState .green, ), AppText( - DateUtils.getTimeFormated(DateTime.parse(model + AppDateUtils.getTimeFormated(DateTime.parse(model .prescriptionList[ 0] .entityList[ @@ -187,7 +187,7 @@ class _NewPrescriptionHistoryScreenState Expanded( child: AppText( - DateUtils.getDateFormatted(DateTime.parse(model + AppDateUtils.getDateFormatted(DateTime.parse(model .prescriptionList[0] .entityList[index] .startDate)), diff --git a/lib/screens/prescription/prescriptions_page.dart b/lib/screens/prescription/prescriptions_page.dart index 19ce09e4..330aa827 100644 --- a/lib/screens/prescription/prescriptions_page.dart +++ b/lib/screens/prescription/prescriptions_page.dart @@ -121,7 +121,7 @@ class PrescriptionsPage extends StatelessWidget { .clinicDescription, isPrescriptions: true, appointmentDate: - DateUtils.getDateTimeFromServerFormat( + AppDateUtils.getDateTimeFromServerFormat( model.prescriptionsList[index] .appointmentDate, ), @@ -168,12 +168,12 @@ class PrescriptionsPage extends StatelessWidget { patient: patient, patientType: patientType, arrivalType: arrivalType, - startOn: DateUtils + startOn: AppDateUtils .getDateTimeFromServerFormat( model.inPatientPrescription[index] .startDatetime, ), - stopOn: DateUtils + stopOn: AppDateUtils .getDateTimeFromServerFormat( model.inPatientPrescription[index] .stopDatetime, @@ -189,7 +189,7 @@ class PrescriptionsPage extends StatelessWidget { clinic: 'basheer', isPrescriptions: true, appointmentDate: - DateUtils.getDateTimeFromServerFormat( + AppDateUtils.getDateTimeFromServerFormat( model.inPatientPrescription[index] .prescriptionDatetime, ), diff --git a/lib/screens/prescription/update_prescription_form.dart b/lib/screens/prescription/update_prescription_form.dart index 378909ad..d6048da2 100644 --- a/lib/screens/prescription/update_prescription_form.dart +++ b/lib/screens/prescription/update_prescription_form.dart @@ -664,11 +664,11 @@ class _UpdatePrescriptionFormState extends State { child: TextField( decoration: Helpers .textFieldSelectorDecoration( - DateUtils.getDateFormatted( + AppDateUtils.getDateFormatted( DateTime.parse( widget.startDate)), selectedDate != null - ? "${DateUtils.convertStringToDateFormat(selectedDate.toString(), "yyyy-MM-dd")}" + ? "${AppDateUtils.convertStringToDateFormat(selectedDate.toString(), "yyyy-MM-dd")}" : null, true, suffixIcon: Icon( diff --git a/lib/screens/procedures/ProcedureCard.dart b/lib/screens/procedures/ProcedureCard.dart index 5b882c94..f18422ee 100644 --- a/lib/screens/procedures/ProcedureCard.dart +++ b/lib/screens/procedures/ProcedureCard.dart @@ -99,13 +99,13 @@ class ProcedureCard extends StatelessWidget { mainAxisAlignment: MainAxisAlignment.end, children: [ AppText( - '${DateUtils.getDayMonthYearDateFormatted(DateUtils.convertISOStringToDateTime(entityList.orderDate), isArabic: projectViewModel.isArabic)}', + '${AppDateUtils.getDayMonthYearDateFormatted(AppDateUtils.convertISOStringToDateTime(entityList.orderDate), isArabic: projectViewModel.isArabic)}', color: Colors.black, fontWeight: FontWeight.w600, fontSize: 14, ), AppText( - '${DateUtils.getHour(DateUtils.convertISOStringToDateTime(entityList.orderDate))}', + '${AppDateUtils.getHour(AppDateUtils.convertISOStringToDateTime(entityList.orderDate))}', fontWeight: FontWeight.w600, color: Colors.grey[700], fontSize: 14, diff --git a/lib/screens/reschedule-leaves/add-rescheduleleave.dart b/lib/screens/reschedule-leaves/add-rescheduleleave.dart index c7c52745..2e0a284f 100644 --- a/lib/screens/reschedule-leaves/add-rescheduleleave.dart +++ b/lib/screens/reschedule-leaves/add-rescheduleleave.dart @@ -90,7 +90,7 @@ class AddRescheduleLeavScreen extends StatelessWidget { padding: EdgeInsets.only(top: 10), child: AppText( - DateUtils + AppDateUtils .convertStringToDateFormat( item.createdOn, 'yyyy-MM-dd HH:mm'), @@ -124,7 +124,7 @@ class AddRescheduleLeavScreen extends StatelessWidget { AppText(TranslationBase.of(context) .startDate), AppText( - DateUtils.convertStringToDateFormat( + AppDateUtils.convertStringToDateFormat( item.dateTimeFrom, 'yyyy-MM-dd HH:mm'), fontWeight: FontWeight.bold, @@ -145,7 +145,7 @@ class AddRescheduleLeavScreen extends StatelessWidget { AppText(TranslationBase.of(context) .endDate), AppText( - DateUtils + AppDateUtils .convertStringToDateFormat( item.dateTimeTo, 'yyyy-MM-dd HH:mm'), diff --git a/lib/screens/sick-leave/add-sickleave.dart b/lib/screens/sick-leave/add-sickleave.dart index 7820b16c..45d79aed 100644 --- a/lib/screens/sick-leave/add-sickleave.dart +++ b/lib/screens/sick-leave/add-sickleave.dart @@ -184,7 +184,7 @@ class AddSickLeavScreen extends StatelessWidget { ), Flexible( child: AppText( - DateUtils + AppDateUtils .convertStringToDateFormat( item.startDate, 'dd-MMM-yyyy'), diff --git a/lib/screens/sick-leave/show-sickleave.dart b/lib/screens/sick-leave/show-sickleave.dart index 31f186f1..3fbb3287 100644 --- a/lib/screens/sick-leave/show-sickleave.dart +++ b/lib/screens/sick-leave/show-sickleave.dart @@ -117,7 +117,7 @@ class ShowSickLeaveScreen extends StatelessWidget { ), Flexible( child: AppText( - DateUtils + AppDateUtils .convertStringToDateFormat( item.startDate, 'dd-MMM-yyyy'), diff --git a/lib/util/date-utils.dart b/lib/util/date-utils.dart index d380ee93..82a6158d 100644 --- a/lib/util/date-utils.dart +++ b/lib/util/date-utils.dart @@ -2,7 +2,7 @@ import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:flutter/cupertino.dart'; import 'package:intl/intl.dart'; -class DateUtils { +class AppDateUtils { static String convertDateToFormat(DateTime dateTime, String dateFormat) { return DateFormat(dateFormat).format(dateTime); } @@ -298,7 +298,7 @@ class DateUtils { static String getAgeByBirthday(dynamic birthday, BuildContext context) { // https://leechy.dev/calculate-dates-diff-in-dart - DateTime birthDate = DateUtils.getDateTimeFromServerFormat(birthday); + DateTime birthDate = AppDateUtils.getDateTimeFromServerFormat(birthday); final now = DateTime.now(); int years = now.year - birthDate.year; int months = now.month - birthDate.month; diff --git a/lib/widgets/auth/verification_methods.dart b/lib/widgets/auth/verification_methods.dart index 48d93f54..72c564dc 100644 --- a/lib/widgets/auth/verification_methods.dart +++ b/lib/widgets/auth/verification_methods.dart @@ -183,13 +183,13 @@ class _VerificationMethodsState extends State { child: ListTile( title: AppText( user.editedOn != null - ? getDate(DateUtils + ? getDate(AppDateUtils .convertStringToDate( user .editedOn)) : user.createdOn != null - ? getDate(DateUtils + ? getDate(AppDateUtils .convertStringToDate( user.createdOn)) : '--', @@ -201,13 +201,13 @@ class _VerificationMethodsState extends State { ), subtitle: AppText( user.editedOn != null - ? getTime(DateUtils + ? getTime(AppDateUtils .convertStringToDate( user .editedOn)) : user.createdOn != null - ? getTime(DateUtils + ? getTime(AppDateUtils .convertStringToDate( user.createdOn)) : '--', diff --git a/lib/widgets/doctor/doctor_reply_widget.dart b/lib/widgets/doctor/doctor_reply_widget.dart index 55173809..7817ba3c 100644 --- a/lib/widgets/doctor/doctor_reply_widget.dart +++ b/lib/widgets/doctor/doctor_reply_widget.dart @@ -66,19 +66,19 @@ class _DoctorReplyWidgetState extends State { crossAxisAlignment: CrossAxisAlignment.end, children: [ AppText( - DateUtils.getDateTimeFromServerFormat( + AppDateUtils.getDateTimeFromServerFormat( widget.reply.createdOn) .day .toString() + " " + - DateUtils.getMonth( - DateUtils.getDateTimeFromServerFormat( + AppDateUtils.getMonth( + AppDateUtils.getDateTimeFromServerFormat( widget.reply.createdOn) .month) .toString() .substring(0, 3) + ' ' + - DateUtils.getDateTimeFromServerFormat( + AppDateUtils.getDateTimeFromServerFormat( widget.reply.createdOn) .year .toString(), @@ -86,12 +86,12 @@ class _DoctorReplyWidgetState extends State { fontWeight: FontWeight.w600, ), AppText( - DateUtils.getDateTimeFromServerFormat( + AppDateUtils.getDateTimeFromServerFormat( widget.reply.createdOn) .hour .toString() + ":"+ - DateUtils.getDateTimeFromServerFormat( + AppDateUtils.getDateTimeFromServerFormat( widget.reply.createdOn) .minute .toString(), @@ -216,7 +216,7 @@ class _DoctorReplyWidgetState extends State { style: TextStyle(fontSize: 14,color: Color(0xFF575757),fontWeight: FontWeight.bold)), new TextSpan( text: - "${DateUtils.getAgeByBirthday(widget.reply.dateofBirth, context)}", + "${AppDateUtils.getAgeByBirthday(widget.reply.dateofBirth, context)}", style: TextStyle( fontWeight: FontWeight.w700, fontSize: 15)), diff --git a/lib/widgets/doctor/my_schedule_widget.dart b/lib/widgets/doctor/my_schedule_widget.dart index e4112cf2..54df8cd9 100644 --- a/lib/widgets/doctor/my_schedule_widget.dart +++ b/lib/widgets/doctor/my_schedule_widget.dart @@ -33,13 +33,13 @@ class MyScheduleWidget extends StatelessWidget { height: 10, ), AppText( - projectViewModel.isArabic?DateUtils.getWeekDayArabic(workingHoursTable.date.weekday): DateUtils.getWeekDay(workingHoursTable.date.weekday) , + projectViewModel.isArabic?AppDateUtils.getWeekDayArabic(workingHoursTable.date.weekday): AppDateUtils.getWeekDay(workingHoursTable.date.weekday) , fontSize: 16, fontFamily: 'Poppins', // fontSize: 18 ), AppText( - ' ${workingHoursTable.date.day} ${(DateUtils.getMonth(workingHoursTable.date.month).toString().substring(0, 3))}', + ' ${workingHoursTable.date.day} ${(AppDateUtils.getMonth(workingHoursTable.date.month).toString().substring(0, 3))}', fontSize: 14, fontWeight: FontWeight.w700, fontFamily: 'Poppins', @@ -51,7 +51,7 @@ class MyScheduleWidget extends StatelessWidget { Container( width: MediaQuery.of(context).size.width * 0.55, child: CardWithBgWidget( - bgColor: DateUtils.isToday(workingHoursTable.date) + bgColor: AppDateUtils.isToday(workingHoursTable.date) ? Colors.green[500] : Colors.transparent, // hasBorder: false, @@ -59,7 +59,7 @@ class MyScheduleWidget extends StatelessWidget { child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - if (DateUtils.isToday(workingHoursTable.date)) + if (AppDateUtils.isToday(workingHoursTable.date)) AppText( "Today", fontSize: 1.8 * SizeConfig.textMultiplier, diff --git a/lib/widgets/patients/PatientCard.dart b/lib/widgets/patients/PatientCard.dart index 5dcedc7e..a3362f3a 100644 --- a/lib/widgets/patients/PatientCard.dart +++ b/lib/widgets/patients/PatientCard.dart @@ -87,7 +87,7 @@ class PatientCard extends StatelessWidget { ) : patientInfo.arrivedOn != null ? AppText( - DateUtils.convertStringToDateFormat( + AppDateUtils.convertStringToDateFormat( patientInfo.arrivedOn, 'MM-dd-yyyy HH:mm'), fontFamily: 'Poppins', @@ -231,7 +231,7 @@ class PatientCard extends StatelessWidget { style: TextStyle(fontSize: 14)), new TextSpan( text: - "${DateUtils.getAgeByBirthday(patientInfo.dateofBirth, context)}", + "${AppDateUtils.getAgeByBirthday(patientInfo.dateofBirth, context)}", style: TextStyle( fontWeight: FontWeight.w700, fontSize: 15)), @@ -260,7 +260,7 @@ class PatientCard extends StatelessWidget { new TextSpan( text: patientInfo.admissionDate == null ? "" - : "${DateUtils.convertDateFromServerFormat(patientInfo.admissionDate.toString(), 'yyyy-MM-dd')}", + : "${AppDateUtils.convertDateFromServerFormat(patientInfo.admissionDate.toString(), 'yyyy-MM-dd')}", style: TextStyle( fontWeight: FontWeight.w700, fontSize: 15)), @@ -273,7 +273,7 @@ class PatientCard extends StatelessWidget { fontSize: 15, ), AppText( - "${DateTime.now().difference(DateUtils.getDateTimeFromServerFormat(patientInfo.admissionDate)).inDays + 1}", + "${DateTime.now().difference(AppDateUtils.getDateTimeFromServerFormat(patientInfo.admissionDate)).inDays + 1}", fontSize: 15, fontWeight: FontWeight.w700), ], diff --git a/lib/widgets/patients/profile/PatientProfileButton.dart b/lib/widgets/patients/profile/PatientProfileButton.dart index a9db021f..84b1b292 100644 --- a/lib/widgets/patients/profile/PatientProfileButton.dart +++ b/lib/widgets/patients/profile/PatientProfileButton.dart @@ -117,10 +117,10 @@ class PatientProfileButton extends StatelessWidget { return; if (from == null) { - from = DateUtils.convertDateToFormat(DateTime.now(), 'yyyy-MM-dd'); + from = AppDateUtils.convertDateToFormat(DateTime.now(), 'yyyy-MM-dd'); } if (to == null) { - to = DateUtils.convertDateToFormat(DateTime.now(), 'yyyy-MM-dd'); + to = AppDateUtils.convertDateToFormat(DateTime.now(), 'yyyy-MM-dd'); } if(arrivalType == null){ arrivalType = "0"; diff --git a/lib/widgets/patients/profile/patient-profile-header-new-design-app-bar.dart b/lib/widgets/patients/profile/patient-profile-header-new-design-app-bar.dart index 48454af4..c3c9adf9 100644 --- a/lib/widgets/patients/profile/patient-profile-header-new-design-app-bar.dart +++ b/lib/widgets/patients/profile/patient-profile-header-new-design-app-bar.dart @@ -139,7 +139,7 @@ class PatientProfileHeaderNewDesignAppBar extends StatelessWidget ) : AppText( patient.arrivedOn != null - ? DateUtils.convertStringToDateFormat( + ? AppDateUtils.convertStringToDateFormat( patient.arrivedOn, 'MM-dd-yyyy HH:mm') : '', @@ -258,7 +258,7 @@ class PatientProfileHeaderNewDesignAppBar extends StatelessWidget style: TextStyle(fontSize: 14)), new TextSpan( text: - "${DateUtils.getAgeByBirthday(patient.patientDetails != null ? patient.patientDetails.dateofBirth??"" : patient.dateofBirth??"", context)}", + "${AppDateUtils.getAgeByBirthday(patient.patientDetails != null ? patient.patientDetails.dateofBirth??"" : patient.dateofBirth??"", context)}", style: TextStyle( fontWeight: FontWeight.w700, fontSize: 14)), ], diff --git a/lib/widgets/patients/profile/patient-profile-header-new-design.dart b/lib/widgets/patients/profile/patient-profile-header-new-design.dart index 27984614..04e2ad42 100644 --- a/lib/widgets/patients/profile/patient-profile-header-new-design.dart +++ b/lib/widgets/patients/profile/patient-profile-header-new-design.dart @@ -139,7 +139,7 @@ class PatientProfileHeaderNewDesign extends StatelessWidget { fontWeight: FontWeight.w600, ) : AppText( - DateUtils.getDayMonthYearDateFormatted(DateUtils.convertStringToDate(patient.arrivedOn)), + AppDateUtils.getDayMonthYearDateFormatted(AppDateUtils.convertStringToDate(patient.arrivedOn)), fontFamily: 'Poppins', fontWeight: FontWeight.w600, ) @@ -258,7 +258,7 @@ class PatientProfileHeaderNewDesign extends StatelessWidget { style: TextStyle(fontSize: 14)), new TextSpan( text: - "${DateUtils.getAgeByBirthday(patient.patientDetails != null ? patient.patientDetails.dateofBirth ?? "" : patient.dateofBirth ?? "", context)}", + "${AppDateUtils.getAgeByBirthday(patient.patientDetails != null ? patient.patientDetails.dateofBirth ?? "" : patient.dateofBirth ?? "", context)}", style: TextStyle( fontWeight: FontWeight.w700, fontSize: 14)), ], diff --git a/lib/widgets/patients/profile/patient-profile-header-new-design_in_patient.dart b/lib/widgets/patients/profile/patient-profile-header-new-design_in_patient.dart index 272fc238..3beddd1a 100644 --- a/lib/widgets/patients/profile/patient-profile-header-new-design_in_patient.dart +++ b/lib/widgets/patients/profile/patient-profile-header-new-design_in_patient.dart @@ -124,7 +124,7 @@ class PatientProfileHeaderNewDesignInPatient extends StatelessWidget { Row( children: [ AppText( - DateUtils.convertDateFromServerFormat( + AppDateUtils.convertDateFromServerFormat( patient.admissionDate, "hh:mm a"), fontWeight: FontWeight.bold, fontSize: 1.4 * SizeConfig.textMultiplier, @@ -143,7 +143,7 @@ class PatientProfileHeaderNewDesignInPatient extends StatelessWidget { fontSize: 1.2 * SizeConfig.textMultiplier, ), AppText( - DateUtils.convertDateFromServerFormat( + AppDateUtils.convertDateFromServerFormat( patient.admissionDate, "dd MMM,yyyy"), fontSize: 1.4 * SizeConfig.textMultiplier, fontWeight: FontWeight.w700), @@ -184,7 +184,7 @@ class PatientProfileHeaderNewDesignInPatient extends StatelessWidget { fontSize: 1.2 * SizeConfig.textMultiplier, ), AppText( - "${DateTime.now().difference(DateUtils.getDateTimeFromServerFormat(patient.admissionDate)).inDays + 1}", + "${DateTime.now().difference(AppDateUtils.getDateTimeFromServerFormat(patient.admissionDate)).inDays + 1}", fontSize: 1.4 * SizeConfig.textMultiplier, fontWeight: FontWeight.w700), ], diff --git a/lib/widgets/patients/profile/patient_profile_header_with_appointment_card.dart b/lib/widgets/patients/profile/patient_profile_header_with_appointment_card.dart index acbb5f05..f3e01316 100644 --- a/lib/widgets/patients/profile/patient_profile_header_with_appointment_card.dart +++ b/lib/widgets/patients/profile/patient_profile_header_with_appointment_card.dart @@ -174,7 +174,7 @@ class PatientProfileHeaderWhitAppointment extends StatelessWidget { FontWeight.w600, ) : AppText( - DateUtils.convertStringToDateFormat( + AppDateUtils.convertStringToDateFormat( patient .arrivedOn, 'MM-dd-yyyy HH:mm'), @@ -334,7 +334,7 @@ class PatientProfileHeaderWhitAppointment extends StatelessWidget { fontSize: 14)), new TextSpan( text: - "${DateUtils.getAgeByBirthday(patient.patientDetails != null ? patient.patientDetails.dateofBirth ??"": patient.dateofBirth??"", context)}", + "${AppDateUtils.getAgeByBirthday(patient.patientDetails != null ? patient.patientDetails.dateofBirth ??"": patient.dateofBirth??"", context)}", style: TextStyle( fontWeight: FontWeight.w700, @@ -446,7 +446,7 @@ class PatientProfileHeaderWhitAppointment extends StatelessWidget { ), Expanded( child: AppText( - '${DateUtils.getDayMonthYearDateFormatted(appointmentDate, isArabic: projectViewModel.isArabic)}', + '${AppDateUtils.getDayMonthYearDateFormatted(appointmentDate, isArabic: projectViewModel.isArabic)}', ), ) ], diff --git a/lib/widgets/patients/profile/patient_profile_header_with_appointment_card_app_bar.dart b/lib/widgets/patients/profile/patient_profile_header_with_appointment_card_app_bar.dart index 0adfac4d..2e47b211 100644 --- a/lib/widgets/patients/profile/patient_profile_header_with_appointment_card_app_bar.dart +++ b/lib/widgets/patients/profile/patient_profile_header_with_appointment_card_app_bar.dart @@ -164,7 +164,7 @@ class PatientProfileHeaderWhitAppointmentAppBar extends StatelessWidget fontWeight: FontWeight.w600, ) : AppText( - DateUtils.convertStringToDateFormat( + AppDateUtils.convertStringToDateFormat( patient.arrivedOn, 'MM-dd-yyyy HH:mm'), fontFamily: 'Poppins', @@ -284,7 +284,7 @@ class PatientProfileHeaderWhitAppointmentAppBar extends StatelessWidget style: TextStyle(fontSize: 14)), new TextSpan( text: - "${DateUtils.getAgeByBirthday(patient.patientDetails != null ? patient.patientDetails.dateofBirth : patient.dateofBirth, context)}", + "${AppDateUtils.getAgeByBirthday(patient.patientDetails != null ? patient.patientDetails.dateofBirth : patient.dateofBirth, context)}", style: TextStyle( fontWeight: FontWeight.w700, fontSize: 14)), ], @@ -408,7 +408,7 @@ class PatientProfileHeaderWhitAppointmentAppBar extends StatelessWidget ), ), AppText( - '${DateUtils.getDayMonthYearDateFormatted(appointmentDate, isArabic: projectViewModel.isArabic)}', + '${AppDateUtils.getDayMonthYearDateFormatted(appointmentDate, isArabic: projectViewModel.isArabic)}', fontSize: 14, ) ], diff --git a/lib/widgets/patients/vital_sign_details_wideget.dart b/lib/widgets/patients/vital_sign_details_wideget.dart index 8635f597..b8314b03 100644 --- a/lib/widgets/patients/vital_sign_details_wideget.dart +++ b/lib/widgets/patients/vital_sign_details_wideget.dart @@ -90,7 +90,7 @@ class _VitalSignDetailsWidgetState extends State { color: Colors.white, child: Center( child: AppText( - '${DateUtils.getWeekDay(vital.vitalSignDate.weekday)}, ${vital.vitalSignDate.day} ${DateUtils.getMonth(vital.vitalSignDate.month)}, ${vital.vitalSignDate.year} ', + '${AppDateUtils.getWeekDay(vital.vitalSignDate.weekday)}, ${vital.vitalSignDate.day} ${AppDateUtils.getMonth(vital.vitalSignDate.month)}, ${vital.vitalSignDate.year} ', textAlign: TextAlign.center, ), ), diff --git a/lib/widgets/shared/doctor_card.dart b/lib/widgets/shared/doctor_card.dart index 1c889d9d..af7d084c 100644 --- a/lib/widgets/shared/doctor_card.dart +++ b/lib/widgets/shared/doctor_card.dart @@ -67,14 +67,14 @@ class DoctorCard extends StatelessWidget { crossAxisAlignment: CrossAxisAlignment.end, children: [ AppText( - '${DateUtils.getDayMonthYearDateFormatted(appointmentDate, isArabic: projectViewModel.isArabic)}', + '${AppDateUtils.getDayMonthYearDateFormatted(appointmentDate, isArabic: projectViewModel.isArabic)}', color: Colors.black, fontWeight: FontWeight.w600, fontSize: 14, ), if (!isPrescriptions&& isShowTime) AppText( - '${DateUtils.getHour(appointmentDate)}', + '${AppDateUtils.getHour(appointmentDate)}', fontWeight: FontWeight.w600, color: Colors.grey[700], fontSize: 14, diff --git a/lib/widgets/shared/loader/gif_loader_dialog_utils.dart b/lib/widgets/shared/loader/gif_loader_dialog_utils.dart index 9b45bba1..bf383fff 100644 --- a/lib/widgets/shared/loader/gif_loader_dialog_utils.dart +++ b/lib/widgets/shared/loader/gif_loader_dialog_utils.dart @@ -5,7 +5,7 @@ import 'gif_loader_container.dart'; class GifLoaderDialogUtils { static showMyDialog(BuildContext context) { - showDialog(context: context, child: GifLoaderContainer()); + showDialog(context: context, builder: (ctx) => GifLoaderContainer()); } static hideDialog(BuildContext context) { diff --git a/lib/widgets/shared/user-guid/in_patient_doctor_card.dart b/lib/widgets/shared/user-guid/in_patient_doctor_card.dart index 47ced262..9197a4a1 100644 --- a/lib/widgets/shared/user-guid/in_patient_doctor_card.dart +++ b/lib/widgets/shared/user-guid/in_patient_doctor_card.dart @@ -63,14 +63,14 @@ class InPatientDoctorCard extends StatelessWidget { crossAxisAlignment: CrossAxisAlignment.end, children: [ AppText( - '${DateUtils.getDayMonthYearDateFormatted(appointmentDate, isArabic: projectViewModel.isArabic)}', + '${AppDateUtils.getDayMonthYearDateFormatted(appointmentDate, isArabic: projectViewModel.isArabic)}', color: Colors.black, fontWeight: FontWeight.w600, fontSize: 14, ), if (!isPrescriptions) AppText( - '${DateUtils.getHour(appointmentDate)}', + '${AppDateUtils.getHour(appointmentDate)}', fontWeight: FontWeight.w600, color: Colors.grey[700], fontSize: 14, diff --git a/pubspec.lock b/pubspec.lock index 9d52ce65..dee0b11c 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -35,7 +35,7 @@ packages: name: async url: "https://pub.dartlang.org" source: hosted - version: "2.5.0-nullsafety.1" + version: "2.5.0" autocomplete_textfield: dependency: "direct main" description: @@ -63,7 +63,7 @@ packages: name: boolean_selector url: "https://pub.dartlang.org" source: hosted - version: "2.1.0-nullsafety.1" + version: "2.1.0" build: dependency: transitive description: @@ -140,14 +140,14 @@ packages: name: characters url: "https://pub.dartlang.org" source: hosted - version: "1.1.0-nullsafety.3" + version: "1.1.0" charcode: dependency: transitive description: name: charcode url: "https://pub.dartlang.org" source: hosted - version: "1.2.0-nullsafety.1" + version: "1.2.0" charts_common: dependency: transitive description: @@ -196,7 +196,7 @@ packages: name: clock url: "https://pub.dartlang.org" source: hosted - version: "1.1.0-nullsafety.1" + version: "1.1.0" code_builder: dependency: transitive description: @@ -210,7 +210,7 @@ packages: name: collection url: "https://pub.dartlang.org" source: hosted - version: "1.15.0-nullsafety.3" + version: "1.15.0" connectivity: dependency: "direct main" description: @@ -336,7 +336,7 @@ packages: name: fake_async url: "https://pub.dartlang.org" source: hosted - version: "1.2.0-nullsafety.1" + version: "1.2.0" ffi: dependency: transitive description: @@ -552,7 +552,7 @@ packages: name: intl url: "https://pub.dartlang.org" source: hosted - version: "0.16.1" + version: "0.17.0-nullsafety.2" io: dependency: transitive description: @@ -566,7 +566,7 @@ packages: name: js url: "https://pub.dartlang.org" source: hosted - version: "0.6.2" + version: "0.6.3" json_annotation: dependency: transitive description: @@ -601,14 +601,14 @@ packages: name: matcher url: "https://pub.dartlang.org" source: hosted - version: "0.12.10-nullsafety.1" + version: "0.12.10" meta: dependency: transitive description: name: meta url: "https://pub.dartlang.org" source: hosted - version: "1.3.0-nullsafety.3" + version: "1.3.0" mime: dependency: transitive description: @@ -657,7 +657,7 @@ packages: name: path url: "https://pub.dartlang.org" source: hosted - version: "1.8.0-nullsafety.1" + version: "1.8.0" path_drawing: dependency: transitive description: @@ -886,7 +886,7 @@ packages: name: source_span url: "https://pub.dartlang.org" source: hosted - version: "1.8.0-nullsafety.2" + version: "1.8.0" speech_to_text: dependency: "direct main" description: @@ -900,7 +900,7 @@ packages: name: stack_trace url: "https://pub.dartlang.org" source: hosted - version: "1.10.0-nullsafety.1" + version: "1.10.0" sticky_headers: dependency: "direct main" description: @@ -914,7 +914,7 @@ packages: name: stream_channel url: "https://pub.dartlang.org" source: hosted - version: "2.1.0-nullsafety.1" + version: "2.1.0" stream_transform: dependency: transitive description: @@ -928,21 +928,21 @@ packages: name: string_scanner url: "https://pub.dartlang.org" source: hosted - version: "1.1.0-nullsafety.1" + version: "1.1.0" term_glyph: dependency: transitive description: name: term_glyph url: "https://pub.dartlang.org" source: hosted - version: "1.2.0-nullsafety.1" + version: "1.2.0" test_api: dependency: transitive description: name: test_api url: "https://pub.dartlang.org" source: hosted - version: "0.2.19-nullsafety.2" + version: "0.2.19" timing: dependency: transitive description: @@ -963,7 +963,7 @@ packages: name: typed_data url: "https://pub.dartlang.org" source: hosted - version: "1.3.0-nullsafety.3" + version: "1.3.0" url_launcher: dependency: "direct main" description: @@ -1012,7 +1012,7 @@ packages: name: vector_math url: "https://pub.dartlang.org" source: hosted - version: "2.1.0-nullsafety.3" + version: "2.1.0" video_player: dependency: transitive description: @@ -1091,5 +1091,5 @@ packages: source: hosted version: "2.2.1" sdks: - dart: ">=2.10.0 <2.11.0" - flutter: ">=1.22.0 <2.0.0" + dart: ">=2.12.0-0.0 <3.0.0" + flutter: ">=1.22.0" diff --git a/pubspec.yaml b/pubspec.yaml index 347b7a62..214e6d46 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -16,6 +16,11 @@ version: 1.0.0+1 environment: sdk: ">=2.8.0 <3.0.0" + +dependency_overrides: + intl: 0.17.0-nullsafety.2 + + dependencies: flutter: sdk: flutter From 4f167d5eec198a60c286aabd6c4ffc6787b04393 Mon Sep 17 00:00:00 2001 From: Mohammad Aljammal Date: Sun, 9 May 2021 13:31:02 +0300 Subject: [PATCH 2/3] comment dependency_overrides --- pubspec.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pubspec.yaml b/pubspec.yaml index 214e6d46..5fc7b850 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -17,8 +17,8 @@ environment: sdk: ">=2.8.0 <3.0.0" -dependency_overrides: - intl: 0.17.0-nullsafety.2 +#dependency_overrides: +# intl: 0.17.0-nullsafety.2 dependencies: From 8e4321b3da255bfe5dc08284a2959b03726f0571 Mon Sep 17 00:00:00 2001 From: Mohammad Aljammal Date: Sun, 9 May 2021 13:43:36 +0300 Subject: [PATCH 3/3] Migration dev to Zohaib branch --- .../viewModel/PatientSearchViewModel.dart | 12 ++--- lib/screens/home/home_screen.dart | 2 +- .../patients/DischargedPatientPage.dart | 3 +- .../ReferralDischargedPatientDetails.dart | 2 +- .../out_patient/filter_date_page.dart | 8 +-- lib/widgets/patients/PatientCard.dart | 6 +-- ...ent-profile-header-new-design-app-bar.dart | 6 +-- pubspec.lock | 51 +++++++++++-------- 8 files changed, 49 insertions(+), 41 deletions(-) diff --git a/lib/core/viewModel/PatientSearchViewModel.dart b/lib/core/viewModel/PatientSearchViewModel.dart index 7a145fff..a0cd68d9 100644 --- a/lib/core/viewModel/PatientSearchViewModel.dart +++ b/lib/core/viewModel/PatientSearchViewModel.dart @@ -98,24 +98,24 @@ class PatientSearchViewModel extends BaseViewModel { DateTime.now().year, DateTime.now().month - 1, DateTime.now().day); selectedToDate = DateTime( DateTime.now().year, DateTime.now().month, DateTime.now().day - 1); - dateTo = DateUtils.convertDateToFormat(selectedToDate, 'yyyy-MM-dd'); - dateFrom = DateUtils.convertDateToFormat(selectedFromDate, 'yyyy-MM-dd'); + dateTo = AppDateUtils.convertDateToFormat(selectedToDate, 'yyyy-MM-dd'); + dateFrom = AppDateUtils.convertDateToFormat(selectedFromDate, 'yyyy-MM-dd'); } else if (OutPatientFilterType.NextWeek == outPatientFilterType) { - dateTo = DateUtils.convertDateToFormat( + dateTo = AppDateUtils.convertDateToFormat( DateTime(DateTime.now().year, DateTime.now().month, DateTime.now().day + 6), 'yyyy-MM-dd'); - dateFrom = DateUtils.convertDateToFormat( + dateFrom = AppDateUtils.convertDateToFormat( DateTime(DateTime.now().year, DateTime.now().month, DateTime.now().day + 1), 'yyyy-MM-dd'); } else { - dateFrom = DateUtils.convertDateToFormat( + dateFrom = AppDateUtils.convertDateToFormat( DateTime( DateTime.now().year, DateTime.now().month, DateTime.now().day), 'yyyy-MM-dd'); - dateTo = DateUtils.convertDateToFormat( + dateTo = AppDateUtils.convertDateToFormat( DateTime( DateTime.now().year, DateTime.now().month, DateTime.now().day), 'yyyy-MM-dd'); diff --git a/lib/screens/home/home_screen.dart b/lib/screens/home/home_screen.dart index c8dd708d..99eeef91 100644 --- a/lib/screens/home/home_screen.dart +++ b/lib/screens/home/home_screen.dart @@ -570,7 +570,7 @@ class _HomeScreenState extends State { hasBorder: false, onTap: () { String date = - DateUtils.convertDateToFormat( + AppDateUtils.convertDateToFormat( DateTime( DateTime.now().year, DateTime.now().month, diff --git a/lib/screens/patients/DischargedPatientPage.dart b/lib/screens/patients/DischargedPatientPage.dart index f4573f64..7f314c0e 100644 --- a/lib/screens/patients/DischargedPatientPage.dart +++ b/lib/screens/patients/DischargedPatientPage.dart @@ -335,8 +335,9 @@ class _DischargedPatientState extends State { ), - ), + ),], ), + ),) ); } diff --git a/lib/screens/patients/ReferralDischargedPatientDetails.dart b/lib/screens/patients/ReferralDischargedPatientDetails.dart index b55e62b9..f78752ec 100644 --- a/lib/screens/patients/ReferralDischargedPatientDetails.dart +++ b/lib/screens/patients/ReferralDischargedPatientDetails.dart @@ -199,7 +199,7 @@ class ReferralDischargedPatientDetails extends StatelessWidget { ), Expanded( child: AppText( - "${AppDateUtils.convertStringToDate(referredPatient.dischargeDate).difference(DateUtils.convertStringToDate(referredPatient.admissionDate)).inDays + 1}", + "${AppDateUtils.convertStringToDate(referredPatient.dischargeDate).difference(AppDateUtils.convertStringToDate(referredPatient.admissionDate)).inDays + 1}", fontFamily: 'Poppins', fontWeight: FontWeight.w700, fontSize: diff --git a/lib/screens/patients/out_patient/filter_date_page.dart b/lib/screens/patients/out_patient/filter_date_page.dart index c00d362a..14ae707b 100644 --- a/lib/screens/patients/out_patient/filter_date_page.dart +++ b/lib/screens/patients/out_patient/filter_date_page.dart @@ -73,7 +73,7 @@ class _FilterDatePageState extends State { widget.patientSearchViewModel .selectedFromDate != null - ? "${DateUtils.convertStringToDateFormat(widget.patientSearchViewModel.selectedFromDate.toString(), "yyyy-MM-dd")}" + ? "${AppDateUtils.convertStringToDateFormat(widget.patientSearchViewModel.selectedFromDate.toString(), "yyyy-MM-dd")}" : null, true, suffixIcon: Icon( @@ -102,7 +102,7 @@ class _FilterDatePageState extends State { widget.patientSearchViewModel .selectedToDate != null - ? "${DateUtils.convertStringToDateFormat(widget.patientSearchViewModel.selectedToDate.toString(), "yyyy-MM-dd")}" + ? "${AppDateUtils.convertStringToDateFormat(widget.patientSearchViewModel.selectedToDate.toString(), "yyyy-MM-dd")}" : null, true, suffixIcon: Icon( @@ -161,10 +161,10 @@ class _FilterDatePageState extends State { Helpers.showErrorToast( "The difference between from date and end date must be less than 3 months"); } else { - String dateTo = DateUtils.convertDateToFormat( + String dateTo = AppDateUtils.convertDateToFormat( widget.patientSearchViewModel.selectedToDate, 'yyyy-MM-dd'); - String dateFrom = DateUtils.convertDateToFormat( + String dateFrom = AppDateUtils.convertDateToFormat( widget.patientSearchViewModel.selectedFromDate, 'yyyy-MM-dd'); diff --git a/lib/widgets/patients/PatientCard.dart b/lib/widgets/patients/PatientCard.dart index e09167d1..179633e7 100644 --- a/lib/widgets/patients/PatientCard.dart +++ b/lib/widgets/patients/PatientCard.dart @@ -134,8 +134,8 @@ class PatientCard extends StatelessWidget { ) : patientInfo.arrivedOn != null ? AppText( - AppDateUtils.getDayMonthYearDate(DateUtils.convertStringToDate(patientInfo.arrivedOn,) - )+" "+ "${DateUtils.getStartTime(patientInfo.startTime)}", + AppDateUtils.getDayMonthYearDate(AppDateUtils.convertStringToDate(patientInfo.arrivedOn,) + )+" "+ "${AppDateUtils.getStartTime(patientInfo.startTime)}", fontFamily: 'Poppins', fontWeight: FontWeight.w400, fontSize: 15, @@ -143,7 +143,7 @@ class PatientCard extends StatelessWidget { : (patientInfo.appointmentDate != null && patientInfo.appointmentDate.isNotEmpty)? AppText( - "${DateUtils.getDayMonthYearDate(DateUtils.convertStringToDate(patientInfo.appointmentDate,))} ${DateUtils.getStartTime(patientInfo.startTime)}", + "${AppDateUtils.getDayMonthYearDate(AppDateUtils.convertStringToDate(patientInfo.appointmentDate,))} ${AppDateUtils.getStartTime(patientInfo.startTime)}", fontFamily: 'Poppins', fontWeight: FontWeight.w400, fontSize: 15, diff --git a/lib/widgets/patients/profile/patient-profile-header-new-design-app-bar.dart b/lib/widgets/patients/profile/patient-profile-header-new-design-app-bar.dart index 48ecc0cf..07bfe8f7 100644 --- a/lib/widgets/patients/profile/patient-profile-header-new-design-app-bar.dart +++ b/lib/widgets/patients/profile/patient-profile-header-new-design-app-bar.dart @@ -291,7 +291,7 @@ class PatientProfileHeaderNewDesignAppBar extends StatelessWidget new TextSpan( text: patient.admissionDate == null ? "" - : "${DateUtils.convertDateFromServerFormat(patient.admissionDate.toString(), 'yyyy-MM-dd')}", + : "${AppDateUtils.convertDateFromServerFormat(patient.admissionDate.toString(), 'yyyy-MM-dd')}", style: TextStyle( fontWeight: FontWeight.w700, fontSize: 15)), @@ -305,12 +305,12 @@ class PatientProfileHeaderNewDesignAppBar extends StatelessWidget ), if(isDischargedPatient && patient.dischargeDate!=null) AppText( - "${DateUtils.getDateTimeFromServerFormat(patient.dischargeDate).difference(DateUtils.getDateTimeFromServerFormat(patient.admissionDate)).inDays + 1}", + "${AppDateUtils.getDateTimeFromServerFormat(patient.dischargeDate).difference(AppDateUtils.getDateTimeFromServerFormat(patient.admissionDate)).inDays + 1}", fontSize: 15, fontWeight: FontWeight.w700) else AppText( - "${DateTime.now().difference(DateUtils.getDateTimeFromServerFormat(patient.admissionDate)).inDays + 1}", + "${DateTime.now().difference(AppDateUtils.getDateTimeFromServerFormat(patient.admissionDate)).inDays + 1}", fontSize: 15, fontWeight: FontWeight.w700), ], diff --git a/pubspec.lock b/pubspec.lock index dee0b11c..ee31002d 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -35,7 +35,7 @@ packages: name: async url: "https://pub.dartlang.org" source: hosted - version: "2.5.0" + version: "2.5.0-nullsafety.1" autocomplete_textfield: dependency: "direct main" description: @@ -63,7 +63,7 @@ packages: name: boolean_selector url: "https://pub.dartlang.org" source: hosted - version: "2.1.0" + version: "2.1.0-nullsafety.1" build: dependency: transitive description: @@ -140,14 +140,14 @@ packages: name: characters url: "https://pub.dartlang.org" source: hosted - version: "1.1.0" + version: "1.1.0-nullsafety.3" charcode: dependency: transitive description: name: charcode url: "https://pub.dartlang.org" source: hosted - version: "1.2.0" + version: "1.2.0-nullsafety.1" charts_common: dependency: transitive description: @@ -196,7 +196,7 @@ packages: name: clock url: "https://pub.dartlang.org" source: hosted - version: "1.1.0" + version: "1.1.0-nullsafety.1" code_builder: dependency: transitive description: @@ -210,7 +210,7 @@ packages: name: collection url: "https://pub.dartlang.org" source: hosted - version: "1.15.0" + version: "1.15.0-nullsafety.3" connectivity: dependency: "direct main" description: @@ -336,7 +336,7 @@ packages: name: fake_async url: "https://pub.dartlang.org" source: hosted - version: "1.2.0" + version: "1.2.0-nullsafety.1" ffi: dependency: transitive description: @@ -445,6 +445,13 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "1.0.11" + flutter_staggered_grid_view: + dependency: "direct main" + description: + name: flutter_staggered_grid_view + url: "https://pub.dartlang.org" + source: hosted + version: "0.3.4" flutter_svg: dependency: transitive description: @@ -552,7 +559,7 @@ packages: name: intl url: "https://pub.dartlang.org" source: hosted - version: "0.17.0-nullsafety.2" + version: "0.16.1" io: dependency: transitive description: @@ -566,7 +573,7 @@ packages: name: js url: "https://pub.dartlang.org" source: hosted - version: "0.6.3" + version: "0.6.2" json_annotation: dependency: transitive description: @@ -601,14 +608,14 @@ packages: name: matcher url: "https://pub.dartlang.org" source: hosted - version: "0.12.10" + version: "0.12.10-nullsafety.1" meta: dependency: transitive description: name: meta url: "https://pub.dartlang.org" source: hosted - version: "1.3.0" + version: "1.3.0-nullsafety.3" mime: dependency: transitive description: @@ -657,7 +664,7 @@ packages: name: path url: "https://pub.dartlang.org" source: hosted - version: "1.8.0" + version: "1.8.0-nullsafety.1" path_drawing: dependency: transitive description: @@ -886,7 +893,7 @@ packages: name: source_span url: "https://pub.dartlang.org" source: hosted - version: "1.8.0" + version: "1.8.0-nullsafety.2" speech_to_text: dependency: "direct main" description: @@ -900,7 +907,7 @@ packages: name: stack_trace url: "https://pub.dartlang.org" source: hosted - version: "1.10.0" + version: "1.10.0-nullsafety.1" sticky_headers: dependency: "direct main" description: @@ -914,7 +921,7 @@ packages: name: stream_channel url: "https://pub.dartlang.org" source: hosted - version: "2.1.0" + version: "2.1.0-nullsafety.1" stream_transform: dependency: transitive description: @@ -928,21 +935,21 @@ packages: name: string_scanner url: "https://pub.dartlang.org" source: hosted - version: "1.1.0" + version: "1.1.0-nullsafety.1" term_glyph: dependency: transitive description: name: term_glyph url: "https://pub.dartlang.org" source: hosted - version: "1.2.0" + version: "1.2.0-nullsafety.1" test_api: dependency: transitive description: name: test_api url: "https://pub.dartlang.org" source: hosted - version: "0.2.19" + version: "0.2.19-nullsafety.2" timing: dependency: transitive description: @@ -963,7 +970,7 @@ packages: name: typed_data url: "https://pub.dartlang.org" source: hosted - version: "1.3.0" + version: "1.3.0-nullsafety.3" url_launcher: dependency: "direct main" description: @@ -1012,7 +1019,7 @@ packages: name: vector_math url: "https://pub.dartlang.org" source: hosted - version: "2.1.0" + version: "2.1.0-nullsafety.3" video_player: dependency: transitive description: @@ -1091,5 +1098,5 @@ packages: source: hosted version: "2.2.1" sdks: - dart: ">=2.12.0-0.0 <3.0.0" - flutter: ">=1.22.0" + dart: ">=2.10.0 <2.11.0" + flutter: ">=1.22.0 <2.0.0"