|
|
|
@ -34,12 +34,12 @@ class PatientProfileAppBar extends StatelessWidget with PreferredSizeWidget {
|
|
|
|
final String? clinic;
|
|
|
|
final String? clinic;
|
|
|
|
final bool? isAppointmentHeader;
|
|
|
|
final bool? isAppointmentHeader;
|
|
|
|
final bool? isFromLabResult;
|
|
|
|
final bool? isFromLabResult;
|
|
|
|
final VoidCallback? onPressed;
|
|
|
|
// final VoidCallback? onPressed;
|
|
|
|
|
|
|
|
|
|
|
|
PatientProfileAppBar(this.patient,
|
|
|
|
PatientProfileAppBar(this.patient,
|
|
|
|
{ this.patientProfileAppBarModel,
|
|
|
|
{ this.patientProfileAppBarModel,
|
|
|
|
this.isFromLabResult = false,
|
|
|
|
this.isFromLabResult = false,
|
|
|
|
this.onPressed,
|
|
|
|
// this.onPressed,
|
|
|
|
this.height=0,
|
|
|
|
this.height=0,
|
|
|
|
this.isInpatient = false,
|
|
|
|
this.isInpatient = false,
|
|
|
|
this.isDischargedPatient = false,
|
|
|
|
this.isDischargedPatient = false,
|
|
|
|
@ -96,7 +96,7 @@ class PatientProfileAppBar extends StatelessWidget with PreferredSizeWidget {
|
|
|
|
icon: Icon(Icons.arrow_back_ios),
|
|
|
|
icon: Icon(Icons.arrow_back_ios),
|
|
|
|
color: Color(0xFF2B353E), //Colors.black,
|
|
|
|
color: Color(0xFF2B353E), //Colors.black,
|
|
|
|
onPressed: () {
|
|
|
|
onPressed: () {
|
|
|
|
if (onPressed != null) onPressed!();
|
|
|
|
if (patientProfileAppBarModel!.onPressed != null) patientProfileAppBarModel!.onPressed!();
|
|
|
|
Navigator.pop(context);
|
|
|
|
Navigator.pop(context);
|
|
|
|
},
|
|
|
|
},
|
|
|
|
),
|
|
|
|
),
|
|
|
|
@ -417,8 +417,8 @@ class PatientProfileAppBar extends StatelessWidget with PreferredSizeWidget {
|
|
|
|
label: !isPrescriptions!
|
|
|
|
label: !isPrescriptions!
|
|
|
|
? 'Result Date:'
|
|
|
|
? 'Result Date:'
|
|
|
|
: 'Prescriptions Date ',
|
|
|
|
: 'Prescriptions Date ',
|
|
|
|
value:
|
|
|
|
value: AppDateUtils.getDayMonthYearDateFormatted(
|
|
|
|
'${AppDateUtils.getDayMonthYearDateFormatted(appointmentDate!, isArabic: projectViewModel.isArabic)}',
|
|
|
|
patientProfileAppBarModel!.appointmentDate! )
|
|
|
|
),
|
|
|
|
),
|
|
|
|
]),
|
|
|
|
]),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
@ -438,34 +438,34 @@ class PatientProfileAppBar extends StatelessWidget with PreferredSizeWidget {
|
|
|
|
@override
|
|
|
|
@override
|
|
|
|
Size get preferredSize => Size(
|
|
|
|
Size get preferredSize => Size(
|
|
|
|
double.maxFinite,
|
|
|
|
double.maxFinite,
|
|
|
|
height! == 0
|
|
|
|
// height! == 0
|
|
|
|
? isInpatient
|
|
|
|
// ? isInpatient
|
|
|
|
? (isFromLabResult! ? 210 : 200)
|
|
|
|
// ? (isFromLabResult! ? 210 : 200)
|
|
|
|
: isAppointmentHeader!
|
|
|
|
// : isAppointmentHeader!
|
|
|
|
? 290
|
|
|
|
// ? 290
|
|
|
|
: SizeConfig.isHeightVeryShort
|
|
|
|
// : SizeConfig.isHeightVeryShort
|
|
|
|
? 137
|
|
|
|
// ? 137
|
|
|
|
: SizeConfig.isHeightShort
|
|
|
|
// : SizeConfig.isHeightShort
|
|
|
|
? 190
|
|
|
|
// ? 190
|
|
|
|
: SizeConfig.heightMultiplier *
|
|
|
|
// : SizeConfig.heightMultiplier *
|
|
|
|
(SizeConfig.isWidthLarge ? 25 : 20)
|
|
|
|
// (SizeConfig.isWidthLarge ? 25 : 20)
|
|
|
|
: height!
|
|
|
|
// : height!
|
|
|
|
// TODO Elham*2
|
|
|
|
// // TODO Elham*2
|
|
|
|
// patientProfileAppBarModel!.height == 0
|
|
|
|
patientProfileAppBarModel!.height == 0
|
|
|
|
// ? patientProfileAppBarModel!.isAppointmentHeader!
|
|
|
|
? patientProfileAppBarModel!.isAppointmentHeader!
|
|
|
|
// ? 270
|
|
|
|
? 270
|
|
|
|
// : ((localPatient!.appointmentDate!.isNotEmpty)
|
|
|
|
: ((patientProfileAppBarModel!.patient!.appointmentDate!.isNotEmpty)
|
|
|
|
// ? patientProfileAppBarModel!.isFromLabResult!
|
|
|
|
? patientProfileAppBarModel!.isFromLabResult!
|
|
|
|
// ? 190
|
|
|
|
? 190
|
|
|
|
// : 170
|
|
|
|
: 200
|
|
|
|
// : localPatient!.admissionDate != null
|
|
|
|
: patientProfileAppBarModel!.patient!.admissionDate != null
|
|
|
|
// ? patientProfileAppBarModel!.isFromLabResult!
|
|
|
|
? patientProfileAppBarModel!.isFromLabResult!
|
|
|
|
// ? 190
|
|
|
|
? 190
|
|
|
|
// : 170
|
|
|
|
: 170
|
|
|
|
// : patientProfileAppBarModel!.isDischargedPatient!
|
|
|
|
: patientProfileAppBarModel!.isDischargedPatient!
|
|
|
|
// ? 240
|
|
|
|
? 240
|
|
|
|
// : 130)
|
|
|
|
: 130)
|
|
|
|
// : patientProfileAppBarModel!.height!
|
|
|
|
: patientProfileAppBarModel!.height!
|
|
|
|
|
|
|
|
|
|
|
|
);
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|