fixes issues in small devices

episode_fixes
Elham Rababh 4 years ago
parent 6b65de77e9
commit 0780cafcca

@ -524,14 +524,17 @@ class _UpdateAssessmentPageState extends State<UpdateAssessmentPage> {
padding: 10,
disabled: model.state == ViewState.BusyLocal,
onPressed: () async {
if (mySelectedAssessmentList.isEmpty) {
Helpers.showErrorToast(
TranslationBase.of(context)
.assessmentErrorMsg);
} else {
widget.changeLoadingState(true);
widget.changePageViewIndex(3);
}
// TODO Elham*
widget.changePageViewIndex(3);
// if (mySelectedAssessmentList.isEmpty) {
// Helpers.showErrorToast(
// TranslationBase.of(context)
// .assessmentErrorMsg);
// } else {
// widget.changeLoadingState(true);
// widget.changePageViewIndex(3);
// }
},
),
),

@ -104,11 +104,14 @@ class _UpdateObjectivePageState extends State<UpdateObjectivePage> {
isShowAppBar: false,
backgroundColor: Theme.of(context).scaffoldBackgroundColor,
body: SingleChildScrollView(
physics: ScrollPhysics(),
child: Center(
child: FractionallySizedBox(
widthFactor: 0.9,
child: Column(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
SOAPStepHeader(
currentIndex: widget.currentIndex,
@ -269,63 +272,66 @@ class _UpdateObjectivePageState extends State<UpdateObjectivePage> {
}
submitUpdateObjectivePage(SOAPViewModel model) async {
if (mySelectedExamination.isNotEmpty) {
widget.changeLoadingState(true);
Map profile = await sharedPref.getObj(DOCTOR_PROFILE);
DoctorProfileModel doctorProfile = DoctorProfileModel.fromJson(profile);
PostPhysicalExamRequestModel postPhysicalExamRequestModel =
new PostPhysicalExamRequestModel();
mySelectedExamination.forEach((exam) {
if (postPhysicalExamRequestModel.listHisProgNotePhysicalExaminationVM ==
null)
postPhysicalExamRequestModel.listHisProgNotePhysicalExaminationVM =
[];
postPhysicalExamRequestModel.listHisProgNotePhysicalExaminationVM
.add(ListHisProgNotePhysicalExaminationVM(
patientMRN: widget.patientInfo.patientMRN,
episodeId: widget.patientInfo.episodeNo,
appointmentNo: widget.patientInfo.appointmentNo,
remarks: exam.remark ?? '',
createdBy: exam.createdBy ?? doctorProfile.doctorID,
createdOn: exam.createdOn ?? DateTime.now().toIso8601String(),
editedBy: doctorProfile.doctorID,
editedOn: DateTime.now().toIso8601String(),
examId: exam.selectedExamination.id,
examType: exam.selectedExamination.typeId,
isAbnormal: exam.isAbnormal,
isNormal: exam.isNormal,
notExamined: exam.notExamined,
examinationType: exam.isNormal
? 1
: exam.isAbnormal
? 2
: 3,
examinationTypeName: exam.isNormal
? "Normal"
: exam.isAbnormal
? 'AbNormal'
: "Not Examined",
isNew: exam.isNew));
});
if (model.patientPhysicalExamList.isEmpty) {
await model.postPhysicalExam(postPhysicalExamRequestModel);
} else {
await model.patchPhysicalExam(postPhysicalExamRequestModel);
}
// TODO Elham*
widget.changePageViewIndex(2);
if (model.state == ViewState.ErrorLocal) {
widget.changeLoadingState(false);
Helpers.showErrorToast(model.error);
} else {
widget.changeLoadingState(true);
widget.changePageViewIndex(2);
}
} else {
Helpers.showErrorToast(TranslationBase.of(context).examinationErrorMsg);
}
// if (mySelectedExamination.isNotEmpty) {
// widget.changeLoadingState(true);
// Map profile = await sharedPref.getObj(DOCTOR_PROFILE);
//
// DoctorProfileModel doctorProfile = DoctorProfileModel.fromJson(profile);
// PostPhysicalExamRequestModel postPhysicalExamRequestModel =
// new PostPhysicalExamRequestModel();
// mySelectedExamination.forEach((exam) {
// if (postPhysicalExamRequestModel.listHisProgNotePhysicalExaminationVM ==
// null)
// postPhysicalExamRequestModel.listHisProgNotePhysicalExaminationVM =
// [];
//
// postPhysicalExamRequestModel.listHisProgNotePhysicalExaminationVM
// .add(ListHisProgNotePhysicalExaminationVM(
// patientMRN: widget.patientInfo.patientMRN,
// episodeId: widget.patientInfo.episodeNo,
// appointmentNo: widget.patientInfo.appointmentNo,
// remarks: exam.remark ?? '',
// createdBy: exam.createdBy ?? doctorProfile.doctorID,
// createdOn: exam.createdOn ?? DateTime.now().toIso8601String(),
// editedBy: doctorProfile.doctorID,
// editedOn: DateTime.now().toIso8601String(),
// examId: exam.selectedExamination.id,
// examType: exam.selectedExamination.typeId,
// isAbnormal: exam.isAbnormal,
// isNormal: exam.isNormal,
// notExamined: exam.notExamined,
// examinationType: exam.isNormal
// ? 1
// : exam.isAbnormal
// ? 2
// : 3,
// examinationTypeName: exam.isNormal
// ? "Normal"
// : exam.isAbnormal
// ? 'AbNormal'
// : "Not Examined",
// isNew: exam.isNew));
// });
//
// if (model.patientPhysicalExamList.isEmpty) {
// await model.postPhysicalExam(postPhysicalExamRequestModel);
// } else {
// await model.patchPhysicalExam(postPhysicalExamRequestModel);
// }
//
// if (model.state == ViewState.ErrorLocal) {
// widget.changeLoadingState(false);
// Helpers.showErrorToast(model.error);
// } else {
// widget.changeLoadingState(true);
// widget.changePageViewIndex(2);
// }
// } else {
// Helpers.showErrorToast(TranslationBase.of(context).examinationErrorMsg);
// }
}
removeExamination(MasterKeyModel masterKey) {

@ -312,6 +312,10 @@ class _UpdatePlanPageState extends State<UpdatePlanPage> {
),
isExpanded: isProgressExpanded,
),
SizedBox(
height: SizeConfig.heightMultiplier *
(SizeConfig.isHeightVeryShort ? 20 : 10),
),
],
),
),

@ -19,17 +19,17 @@ class SOAPStepHeader extends StatelessWidget {
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
SizedBox(height: 15,),
SizedBox(height: SizeConfig.isHeightVeryShort?30: 15,),
AppText(
TranslationBase.of(context).createNew,
fontSize: SizeConfig.getTextMultiplierBasedOnWidth() * 4,
fontSize: SizeConfig.getTextMultiplierBasedOnWidth() * (SizeConfig.isWidthLarge? 3: 4),
fontWeight: FontWeight.w700,
letterSpacing:-0.72,
color: Color(0xFF2E303A),
),
AppText(TranslationBase.of(context).episode,
fontSize:SizeConfig.getTextMultiplierBasedOnWidth() * 8,
fontSize:SizeConfig.getTextMultiplierBasedOnWidth() * (SizeConfig.isWidthLarge? 6: 8),
fontWeight: FontWeight.bold,
letterSpacing:-1.44,
color: Color(0xFF2E303A),

@ -7,8 +7,9 @@ class BottomSheetDialogButton extends StatelessWidget {
final Function onTap;
final String label;
const BottomSheetDialogButton({Key key, this.onTap, this.label})
: super(key: key);
double headerHeight = SizeConfig.heightMultiplier * 12;
BottomSheetDialogButton({Key key, this.onTap, this.label}) : super(key: key);
@override
Widget build(BuildContext context) {
@ -20,14 +21,13 @@ class BottomSheetDialogButton extends StatelessWidget {
),
border: Border.all(color: HexColor('#EFEFEF'), width: 1),
),
height: SizeConfig.heightMultiplier * 12,
height: headerHeight,
width: double.infinity,
child: Column(
children: [
SizedBox(
height: 10,
),
Container(
margin: EdgeInsets.only(
top: headerHeight * (SizeConfig.isWidthLarge ? 0.3 : 0.2)),
child: FractionallySizedBox(
widthFactor: .80,
child: Center(

@ -8,7 +8,7 @@ class BottomSheetTitle extends StatelessWidget with PreferredSizeWidget {
}) : super(key: key);
final String title;
double headerHeight = SizeConfig.getTextMultiplierBasedOnWidth()*35;
double headerHeight = SizeConfig.heightMultiplier*15;
@override
Widget build(BuildContext context) {
return Container(
@ -63,5 +63,5 @@ class BottomSheetTitle extends StatelessWidget with PreferredSizeWidget {
}
@override
Size get preferredSize => Size(double.maxFinite,115);
Size get preferredSize => Size(double.maxFinite,headerHeight);
}

@ -42,7 +42,7 @@ class ExpandableSOAPWidget extends StatelessWidget {
children: [
AppText(headerTitle,
variant: isExpanded ? "bodyText" : '',
fontSize: SizeConfig.getTextMultiplierBasedOnWidth()*(SizeConfig.isHeightVeryShort?4.8: 5),
fontSize: SizeConfig.getTextMultiplierBasedOnWidth()*(SizeConfig.isHeightVeryShort?4.8: SizeConfig.isWidthLarge?4: 5),
letterSpacing:-0.64,
fontWeight: FontWeight.w700,
color: Color(0xFF2E303A),),

@ -18,13 +18,15 @@ class StepsWidget extends StatelessWidget {
@override
Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context);
double containerHeight = (SizeConfig.isHeightVeryShort ?30:SizeConfig.isHeightShort?38:38);
double circleHeight = (SizeConfig.isHeightVeryShort ?30:SizeConfig.isHeightShort?38:38);
double circleTop = (SizeConfig.isHeightVeryShort ?12:SizeConfig.isHeightShort?10:10);
double containerHeight = SizeConfig.heightMultiplier * (SizeConfig.isHeightVeryShort?16:15);
return !projectViewModel.isArabic
? Stack(
children: [
Container(
height: height == 0 ? 100 : height,
height: height == 0 ? containerHeight : height,
width: MediaQuery.of(context).size.width * 0.9,
color: Colors.transparent,
),
@ -53,8 +55,8 @@ class StepsWidget extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container(
width:containerHeight,
height: containerHeight,
width:circleHeight,
height: circleHeight,
decoration: BoxDecoration(
border: index == 0
? Border.all(color: Color(0xFFCC9B14), width: 2)
@ -103,8 +105,8 @@ class StepsWidget extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Container(
width: containerHeight,
height: containerHeight,
width: circleHeight,
height: circleHeight,
decoration: BoxDecoration(
border: index == 1
? Border.all(color: Color(0xFFCC9B14), width: 2)
@ -157,8 +159,8 @@ class StepsWidget extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Container(
width:containerHeight,
height: containerHeight,
width:circleHeight,
height: circleHeight,
decoration: BoxDecoration(
border: index == 2
? Border.all(color: Color(0xFFCC9B14), width: 2)
@ -206,8 +208,8 @@ class StepsWidget extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.end,
children: [
Container(
width:containerHeight,
height: containerHeight,
width:circleHeight,
height: circleHeight,
decoration: BoxDecoration(
border: index == 3
? Border.all(color: Color(0xFFCC9B14), width: 2)
@ -280,8 +282,8 @@ class StepsWidget extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container(
width:containerHeight,
height: containerHeight,
width:circleHeight,
height: circleHeight,
decoration: BoxDecoration(
border: index == 0
? Border.all(color: Color(0xFFCC9B14), width: 2)
@ -329,8 +331,8 @@ class StepsWidget extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Container(
width:containerHeight,
height: containerHeight,
width:circleHeight,
height: circleHeight,
decoration: BoxDecoration(
border: index == 1
? Border.all(color: Color(0xFFCC9B14), width: 2)
@ -378,8 +380,8 @@ class StepsWidget extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Container(
width:containerHeight,
height: containerHeight,
width:circleHeight,
height: circleHeight,
decoration: BoxDecoration(
border: index == 2
? Border.all(color: Color(0xFFCC9B14), width: 2)
@ -429,8 +431,8 @@ class StepsWidget extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.end,
children: [
Container(
width:containerHeight,
height: containerHeight,
width:circleHeight,
height: circleHeight,
decoration: BoxDecoration(
border: index == 3
? Border.all(color: Color(0xFFCC9B14), width: 2)

@ -552,6 +552,6 @@ class PatientProfileAppBar extends StatelessWidget
@override
Size get preferredSize =>
Size(double.maxFinite, height == 0
? isInpatient ? (isFromLabResult?200:170) : isAppointmentHeader ? 290 : SizeConfig.isHeightVeryShort?150:SizeConfig.isHeightShort?180: 170
? isInpatient ? (isFromLabResult?200:170) : isAppointmentHeader ? 290 : SizeConfig.isHeightVeryShort?137:SizeConfig.isHeightShort?180: SizeConfig.heightMultiplier * (SizeConfig.isWidthLarge?25:20)
: height);
}

Loading…
Cancel
Save