showDailog Migration

DateUtils Conflict with Material (DateUtils -> AppDateUtils)
merge-requests/657/head
Zohaib Iqbal Kambrani 5 years ago
parent cb61f4a746
commit 4b7688d620

@ -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'];

@ -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'];

@ -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<String, dynamic> toJson() {

@ -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'];

@ -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'];

@ -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();

@ -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'];

@ -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},

@ -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);

@ -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);

@ -15,7 +15,7 @@ class ListDoctorWorkingHoursTable {
});
ListDoctorWorkingHoursTable.fromJson(Map<String, dynamic> json) {
date = DateUtils.convertStringToDate(json['Date']);
date = AppDateUtils.convertStringToDate(json['Date']);
dayName = json['DayName'];
workingHours = json['WorkingHours'];
projectName = json['ProjectName'];

@ -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'];

@ -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'];

@ -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'];

@ -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'];

@ -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'];

@ -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,

@ -24,9 +24,9 @@ class _PatientArrivalScreen extends State<PatientArrivalScreen>
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",

@ -959,11 +959,11 @@ class _HomeScreenState extends State<HomeScreen> {
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",

@ -113,7 +113,7 @@ class _MedicalFileDetailsState extends State<MedicalFileDetails> {
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<MedicalFileDetails> {
'Order Date: ',
),
AppText(
DateUtils.getDateFormatted(
AppDateUtils.getDateFormatted(
DateTime
.parse(
model

@ -166,7 +166,7 @@ class _MedicalFilePageState extends State<MedicalFilePage> {
.timelines[index]
.doctorImage,
appointmentDate:
DateUtils.getDateTimeFromServerFormat(
AppDateUtils.getDateTimeFromServerFormat(
model.medicalFileList[0].entityList[0]
.timelines[index].date,
),

@ -270,7 +270,7 @@ class _DischargedPatientState extends State<DischargedPatient> {
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<DischargedPatient> {
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<DischargedPatient> {
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),
],

@ -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,),
],
),
),

@ -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',

@ -67,8 +67,8 @@ class _ReferralDischargedPatientPageState extends State<ReferralDischargedPatien
referralStatusCode: model.myDischargeReferralPatient[index].referralStatus,
patientName: model.myDischargeReferralPatient[index].firstName+" "+model.myDischargeReferralPatient[index].lastName,
patientGender: model.myDischargeReferralPatient[index].gender,
referredDate: DateUtils.getDayMonthYearDateFormatted(model.myDischargeReferralPatient[index].referralDate),
referredTime: DateUtils.getTimeHHMMA(model.myDischargeReferralPatient[index].referralDate),
referredDate: AppDateUtils.getDayMonthYearDateFormatted(model.myDischargeReferralPatient[index].referralDate),
referredTime: AppDateUtils.getTimeHHMMA(model.myDischargeReferralPatient[index].referralDate),
patientID: "${model.myDischargeReferralPatient[index].patientID}",
isSameBranch: false,
isReferral: true,

@ -258,7 +258,7 @@ class _InsuranceApprovalsDetailsState extends State<InsuranceApprovalsDetails> {
),
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<InsuranceApprovalsDetails> {
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<InsuranceApprovalsDetails> {
),
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<InsuranceApprovalsDetails> {
),
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,

@ -90,9 +90,9 @@ class _PatientsScreenState extends State<PatientsScreen> {
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<PatientsScreen> {
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');

@ -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(

@ -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,

@ -87,14 +87,14 @@ class _VitalSignDetailsWidgetState extends State<LabResultDetailsWidget> {
List<TableRow> fullData(ProjectViewModel projectViewModel) {
List<TableRow> 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,

@ -105,7 +105,7 @@ class LineChartCurvedState extends State<LineChartCurved> {
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}';

@ -456,13 +456,13 @@ class _ProgressNoteState extends State<ProgressNoteScreen> {
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<ProgressNoteScreen> {
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<ProgressNoteScreen> {
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<ProgressNoteScreen> {
),
),
),
));
)
);
}

@ -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}',

@ -30,10 +30,10 @@ class MyReferralDetailScreen extends StatelessWidget {
return BaseView<PatientReferralViewModel>(
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),

@ -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,

@ -434,7 +434,7 @@ class _PatientMakeReferralScreenState extends State<PatientMakeReferralScreen> {
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,

@ -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',

@ -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,

@ -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',

@ -389,12 +389,12 @@ class _UpdateAssessmentPageState extends State<UpdateAssessmentPage> {
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<UpdateAssessmentPage> {
fontSize: 14,
), AppText(
assessment.createdOn != null
? DateUtils.getHour(
? AppDateUtils.getHour(
DateTime.parse(
assessment
.createdOn))
: DateUtils.getHour(
: AppDateUtils.getHour(
DateTime.now()),
fontWeight: FontWeight
.w600,

@ -169,7 +169,7 @@ class _UpdatePlanPageState extends State<UpdatePlanPage> {
],
),
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<UpdatePlanPage> {
],
),
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,
)

@ -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,

@ -154,7 +154,7 @@ class _VitalSignDetailsWidgetState extends State<VitalSignBloodPressureWidget> {
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<VitalSignBloodPressureWidget> {
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,

@ -111,7 +111,7 @@ class _VitalSignDetailsWidgetState extends State<VitalSignDetailsWidget> {
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<VitalSignDetailsWidget> {
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,

@ -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(

@ -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(

@ -984,7 +984,7 @@ class _PrescriptionFormWidgetState extends State<PrescriptionFormWidget> {
context)
.date,
selectedDate != null
? "${DateUtils.convertStringToDateFormat(selectedDate.toString(), "yyyy-MM-dd")}"
? "${AppDateUtils.convertStringToDateFormat(selectedDate.toString(), "yyyy-MM-dd")}"
: null,
true,
suffixIcon: Icon(

@ -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,

@ -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,
)
);

@ -226,7 +226,7 @@ class _NewPrescriptionScreenState extends State<NewPrescriptionScreen> {
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<NewPrescriptionScreen> {
.green,
),
AppText(
DateUtils.getTimeFormated(DateTime.parse(model
AppDateUtils.getTimeFormated(DateTime.parse(model
.prescriptionList[
0]
.entityList[
@ -289,7 +289,7 @@ class _NewPrescriptionScreenState extends State<NewPrescriptionScreen> {
Expanded(
child:
AppText(
DateUtils.getDateFormatted(DateTime.parse(model
AppDateUtils.getDateFormatted(DateTime.parse(model
.prescriptionList[0]
.entityList[index]
.startDate)),

@ -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)),

@ -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,
),

@ -664,11 +664,11 @@ class _UpdatePrescriptionFormState extends State<UpdatePrescriptionForm> {
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(

@ -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,

@ -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'),

@ -184,7 +184,7 @@ class AddSickLeavScreen extends StatelessWidget {
),
Flexible(
child: AppText(
DateUtils
AppDateUtils
.convertStringToDateFormat(
item.startDate,
'dd-MMM-yyyy'),

@ -117,7 +117,7 @@ class ShowSickLeaveScreen extends StatelessWidget {
),
Flexible(
child: AppText(
DateUtils
AppDateUtils
.convertStringToDateFormat(
item.startDate,
'dd-MMM-yyyy'),

@ -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;

@ -183,13 +183,13 @@ class _VerificationMethodsState extends State<VerificationMethods> {
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<VerificationMethods> {
),
subtitle: AppText(
user.editedOn != null
? getTime(DateUtils
? getTime(AppDateUtils
.convertStringToDate(
user
.editedOn))
: user.createdOn !=
null
? getTime(DateUtils
? getTime(AppDateUtils
.convertStringToDate(
user.createdOn))
: '--',

@ -66,19 +66,19 @@ class _DoctorReplyWidgetState extends State<DoctorReplyWidget> {
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<DoctorReplyWidget> {
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<DoctorReplyWidget> {
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)),

@ -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: <Widget>[
if (DateUtils.isToday(workingHoursTable.date))
if (AppDateUtils.isToday(workingHoursTable.date))
AppText(
"Today",
fontSize: 1.8 * SizeConfig.textMultiplier,

@ -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),
],

@ -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";

@ -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)),
],

@ -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)),
],

@ -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),
],

@ -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)}',
),
)
],

@ -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,
)
],

@ -90,7 +90,7 @@ class _VitalSignDetailsWidgetState extends State<VitalSignDetailsWidget> {
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,
),
),

@ -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,

@ -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) {

@ -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,

@ -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"

@ -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

Loading…
Cancel
Save