fix design issues on diff pages inside soap

episode_fixes
Elham Rababh 5 years ago
parent 7227679081
commit 6b65de77e9

@ -482,7 +482,8 @@ class _UpdateAssessmentPageState extends State<UpdateAssessmentPage> {
),
border: Border.all(color: HexColor('#707070'), width: 0),
),
height: 80,
height: SizeConfig.heightMultiplier *
(SizeConfig.isHeightVeryShort ? 12 : 10),
width: double.infinity,
child: Column(
children: [
@ -500,6 +501,9 @@ class _UpdateAssessmentPageState extends State<UpdateAssessmentPage> {
title: TranslationBase.of(context).previous,
color: Colors.grey[300],
fontColor: Colors.black,
height: SizeConfig.heightMultiplier *
(SizeConfig.isHeightVeryShort ? 8 : 6),
padding: 10,
fontWeight: FontWeight.w600,
disabled: model.state == ViewState.BusyLocal,
onPressed: () async {
@ -515,6 +519,9 @@ class _UpdateAssessmentPageState extends State<UpdateAssessmentPage> {
title: TranslationBase.of(context).next,
fontWeight: FontWeight.w600,
color: Colors.red[700],
height: SizeConfig.heightMultiplier *
(SizeConfig.isHeightVeryShort ? 8 : 6),
padding: 10,
disabled: model.state == ViewState.BusyLocal,
onPressed: () async {
if (mySelectedAssessmentList.isEmpty) {

@ -102,7 +102,7 @@ class _AddExaminationPageState extends State<AddExaminationPage> {
),
],
),
bottomSheet: model.state == ViewState.Busy
bottomSheet: model.state != ViewState.Idle
? Container(
height: 0,
)

@ -116,7 +116,7 @@ class _AddAllergiesState extends State<AddAllergies> {
]),
),
),
bottomSheet: model.state == ViewState.Busy
bottomSheet: model.state != ViewState.Idle
? Container(
height: 0,
)

@ -163,7 +163,7 @@ class _AddHistoryDialogState extends State<AddHistoryDialog> {
],
)),
),
bottomSheet: model.state == ViewState.Busy
bottomSheet: model.state != ViewState.Idle
? Container(
height: 0,
)

@ -414,7 +414,7 @@ class _AddMedicationState extends State<AddMedication> {
]),
),
),
bottomSheet: model.state == ViewState.Busy
bottomSheet: model.state != ViewState.Idle
? Container(
height: 0,
)

@ -62,68 +62,61 @@ class _UpdateSoapIndexState extends State<UpdateSoapIndex>
PatiantInformtion patient = routeArgs['patient'];
return AppScaffold(
isLoading: _isLoading,
isShowAppBar: false,
isShowAppBar: true,
appBar: PatientProfileAppBar(patient),
body: SingleChildScrollView(
child: SingleChildScrollView(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container(
decoration: BoxDecoration(
boxShadow: <BoxShadow>[],
color: Theme.of(context).scaffoldBackgroundColor),
child: Column(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
PatientProfileAppBar(patient),
Container(
width: double.infinity,
height: 1,
color: Color(0xffCCCCCC),
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container(
decoration: BoxDecoration(
boxShadow: <BoxShadow>[],
color: Theme.of(context).scaffoldBackgroundColor),
child: Column(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Container(
color: Theme.of(context).scaffoldBackgroundColor,
height: MediaQuery.of(context).size.height * 0.73,
child: PageView(
physics: NeverScrollableScrollPhysics(),
controller: _controller,
onPageChanged: (index) {
setState(() {
_currentIndex = index;
});
},
scrollDirection: Axis.horizontal,
children: <Widget>[
UpdateSubjectivePage(
changePageViewIndex: changePageViewIndex,
currentIndex: _currentIndex,
patientInfo: patient,
changeLoadingState: changeLoadingState),
UpdateObjectivePage(
changePageViewIndex: changePageViewIndex,
currentIndex: _currentIndex,
patientInfo: patient,
changeLoadingState: changeLoadingState),
UpdateAssessmentPage(
changePageViewIndex: changePageViewIndex,
currentIndex: _currentIndex,
patientInfo: patient,
changeLoadingState: changeLoadingState),
UpdatePlanPage(
changePageViewIndex: changePageViewIndex,
currentIndex: _currentIndex,
patientInfo: patient,
changeLoadingState: changeLoadingState)
],
),
)
],
),
Container(
color: Theme.of(context).scaffoldBackgroundColor,
height: MediaQuery.of(context).size.height * 0.73,
child: PageView(
physics: NeverScrollableScrollPhysics(),
controller: _controller,
onPageChanged: (index) {
setState(() {
_currentIndex = index;
});
},
scrollDirection: Axis.horizontal,
children: <Widget>[
UpdateSubjectivePage(
changePageViewIndex: changePageViewIndex,
currentIndex: _currentIndex,
patientInfo: patient,
changeLoadingState: changeLoadingState),
UpdateObjectivePage(
changePageViewIndex: changePageViewIndex,
currentIndex: _currentIndex,
patientInfo: patient,
changeLoadingState: changeLoadingState),
UpdateAssessmentPage(
changePageViewIndex: changePageViewIndex,
currentIndex: _currentIndex,
patientInfo: patient,
changeLoadingState: changeLoadingState),
UpdatePlanPage(
changePageViewIndex: changePageViewIndex,
currentIndex: _currentIndex,
patientInfo: patient,
changeLoadingState: changeLoadingState)
],
),
)
],
),
],
),
),
],
),
),
);

@ -75,21 +75,17 @@ class PatientProfileAppBar extends StatelessWidget
),
decoration: BoxDecoration(
color: Colors.white,
border: Border( bottom: BorderSide(color:Color(0xFFEFEFEF)))
),
// height: height == 0
// ? isInpatient
// ? 215
// : isAppointmentHeader
// ? 325
// : 200
// : height,
child: Container(
padding: EdgeInsets.only(left: 10, right: 10, bottom: 10),
margin: EdgeInsets.only(top: 50),
margin: EdgeInsets.only(top: SizeConfig.isHeightVeryShort?30: 50),
child: Column(
children: [
Container(
padding: EdgeInsets.only(left: 12.0),
padding: EdgeInsets.only(left: SizeConfig.isHeightVeryShort?0: 12.0),
child: Row(children: [
IconButton(
icon: Icon(Icons.arrow_back_ios),
@ -138,10 +134,10 @@ class PatientProfileAppBar extends StatelessWidget
),
Row(children: [
Padding(
padding: EdgeInsets.only(left: 12.0),
padding: EdgeInsets.only(left: SizeConfig.isHeightVeryShort?0: 12.0),
child: Container(
width: 60,
height: 60,
width: SizeConfig.getTextMultiplierBasedOnWidth()*20,
height: SizeConfig.getTextMultiplierBasedOnWidth()*20,
child: Image.asset(
gender == 1
? 'assets/images/male_avatar.png'
@ -170,14 +166,14 @@ class PatientProfileAppBar extends StatelessWidget
color: Colors.green,
fontWeight: FontWeight.bold,
fontFamily: 'Poppins',
fontSize: 12,
fontSize: SizeConfig.getTextMultiplierBasedOnWidth() *3.5,
)
: AppText(
TranslationBase.of(context).notArrived,
color: Colors.red[800],
fontWeight: FontWeight.bold,
fontFamily: 'Poppins',
fontSize: 12,
fontSize: SizeConfig.getTextMultiplierBasedOnWidth() *3.5,
),
patient.startTime != null
? AppText(
@ -185,7 +181,7 @@ class PatientProfileAppBar extends StatelessWidget
? patient.startTime
: '',
fontWeight: FontWeight.w700,
fontSize: 12,
fontSize: SizeConfig.getTextMultiplierBasedOnWidth() *3.5,
color: Color(0xFF2E303A))
: SizedBox()
],
@ -207,7 +203,7 @@ class PatientProfileAppBar extends StatelessWidget
.fileNumber,
style: TextStyle(
fontSize: 10,
fontSize: SizeConfig.getTextMultiplierBasedOnWidth() *3,
fontFamily: 'Poppins',
color: Color(0xFF575757),
fontWeight: FontWeight.w600,
@ -218,7 +214,7 @@ class PatientProfileAppBar extends StatelessWidget
style: TextStyle(
fontWeight: FontWeight.w700,
fontFamily: 'Poppins',
fontSize: 12, color: Color(0xFF2E303A),)),
fontSize: SizeConfig.getTextMultiplierBasedOnWidth() *3.5, color: Color(0xFF2E303A),)),
],
),
),
@ -227,7 +223,7 @@ class PatientProfileAppBar extends StatelessWidget
AppText(
patient.nationalityName ?? patient.nationality?? patient.nationalityId ?? '',
fontWeight: FontWeight.bold,
fontSize: 12,
fontSize: SizeConfig.getTextMultiplierBasedOnWidth() *3.5,
),
patient.nationalityFlagURL != null
? ClipRRect(
@ -260,7 +256,7 @@ class PatientProfileAppBar extends StatelessWidget
text: TranslationBase
.of(context)
.age + " : ",
style: TextStyle(fontSize: 10, fontWeight: FontWeight.w600,color: Color(0xFF575757),)),
style: TextStyle(fontSize: SizeConfig.getTextMultiplierBasedOnWidth() *3, fontWeight: FontWeight.w600,color: Color(0xFF575757),)),
new TextSpan(
text:
"${AppDateUtils.getAgeByBirthday(
@ -271,7 +267,7 @@ class PatientProfileAppBar extends StatelessWidget
isServerFormat: !isFromLiveCare)}",
style: TextStyle(
fontWeight: FontWeight.w700,
fontSize: 12,
fontSize: SizeConfig.getTextMultiplierBasedOnWidth() *3.5,
color: Color(0xFF2E303A),)),
],
),
@ -285,7 +281,7 @@ class PatientProfileAppBar extends StatelessWidget
AppText(
TranslationBase.of(context).appointmentDate +
" : ",
fontSize: 10,
fontSize: SizeConfig.getTextMultiplierBasedOnWidth() *3,
color: Color(0xFF575757),
fontWeight: FontWeight.w600,
fontFamily: 'Poppins',
@ -300,7 +296,7 @@ class PatientProfileAppBar extends StatelessWidget
patient.appointmentDate))
,
fontWeight: FontWeight.w700,
fontSize: 12,
fontSize: SizeConfig.getTextMultiplierBasedOnWidth() *3.5,
color: Color(0xFF2E303A),
),
SizedBox(
@ -319,7 +315,7 @@ class PatientProfileAppBar extends StatelessWidget
children: <TextSpan>[
new TextSpan(
text: "Result Date: ",
style: TextStyle( fontSize: 10,
style: TextStyle( fontSize: SizeConfig.getTextMultiplierBasedOnWidth() *3,
color: Color(0xFF575757),
fontWeight: FontWeight.w600,
fontFamily: 'Poppins',)),
@ -341,7 +337,7 @@ class PatientProfileAppBar extends StatelessWidget
child: RichText(
text: new TextSpan(
style: new TextStyle(
fontSize: 10, fontWeight: FontWeight.w600,color: Color(0xFF575757),
fontSize: SizeConfig.getTextMultiplierBasedOnWidth() *3, fontWeight: FontWeight.w600,color: Color(0xFF575757),
fontFamily: 'Poppins',
),
children: <TextSpan>[
@ -363,7 +359,7 @@ class PatientProfileAppBar extends StatelessWidget
.toString())))}",
style: TextStyle(
fontWeight: FontWeight.w700,
fontSize: 12,
fontSize: SizeConfig.getTextMultiplierBasedOnWidth() *3.5,
color: Color(0xFF2E303A),)),
]))),
if (patient.admissionDate != null)
@ -371,7 +367,7 @@ class PatientProfileAppBar extends StatelessWidget
children: [
AppText(
"${TranslationBase.of(context).numOfDays}: ",
fontSize: 10, fontWeight: FontWeight.w600,color: Color(0xFF575757)
fontSize: SizeConfig.getTextMultiplierBasedOnWidth() *3, fontWeight: FontWeight.w600,color: Color(0xFF575757)
),
if(isDischargedPatient &&
patient.dischargeDate != null)
@ -384,7 +380,7 @@ class PatientProfileAppBar extends StatelessWidget
patient.admissionDate))
.inDays + 1}",
fontWeight: FontWeight.w700,
fontSize: 12,
fontSize: SizeConfig.getTextMultiplierBasedOnWidth() *3.5,
color: Color(0xFF2E303A),
)
else
@ -396,7 +392,7 @@ class PatientProfileAppBar extends StatelessWidget
patient.admissionDate))
.inDays + 1}",
fontWeight: FontWeight.w700,
fontSize: 12,
fontSize: SizeConfig.getTextMultiplierBasedOnWidth() *3.5,
color: Color(0xFF2E303A),),
],
),
@ -457,7 +453,7 @@ class PatientProfileAppBar extends StatelessWidget
.dr}$doctorName',
color: Color(0xFF2E303A),
fontWeight: FontWeight.w700,
fontSize: 12,
fontSize: SizeConfig.getTextMultiplierBasedOnWidth() *3.5,
),
if (orderNo != null &&
!isPrescriptions)
@ -465,7 +461,7 @@ class PatientProfileAppBar extends StatelessWidget
children: <Widget>[
AppText('Order No: ',
fontSize: 10, fontWeight: FontWeight.w600,color: Color(0xFF575757),),
fontSize: SizeConfig.getTextMultiplierBasedOnWidth() *3, fontWeight: FontWeight.w600,color: Color(0xFF575757),),
AppText(orderNo ?? '',
fontSize: 12)
],
@ -475,7 +471,7 @@ class PatientProfileAppBar extends StatelessWidget
Row(
children: <Widget>[
AppText('Invoice: ',
fontSize: 10, fontWeight: FontWeight.w600,color: Color(0xFF575757),),
fontSize: SizeConfig.getTextMultiplierBasedOnWidth() *3, fontWeight: FontWeight.w600,color: Color(0xFF575757),),
AppText(invoiceNO ?? "",
fontSize: 12)
],
@ -484,7 +480,7 @@ class PatientProfileAppBar extends StatelessWidget
Row(
children: [
AppText('Branch: ',
fontSize: 10, fontWeight: FontWeight.w600,color: Color(0xFF575757),),
fontSize: SizeConfig.getTextMultiplierBasedOnWidth() *3, fontWeight: FontWeight.w600,color: Color(0xFF575757),),
AppText(branch ?? '',
fontSize: 12)
],
@ -494,7 +490,7 @@ class PatientProfileAppBar extends StatelessWidget
Row(
children: [
AppText('Clinic: ',
fontSize: 10, fontWeight: FontWeight.w600,color: Color(0xFF575757),),
fontSize: SizeConfig.getTextMultiplierBasedOnWidth() *3, fontWeight: FontWeight.w600,color: Color(0xFF575757),),
AppText(clinic ?? '',
fontSize: 12)
],
@ -504,7 +500,7 @@ class PatientProfileAppBar extends StatelessWidget
Row(
children: [
AppText('Episode: ',
fontSize: 10, fontWeight: FontWeight.w600,color: Color(0xFF575757),),
fontSize: SizeConfig.getTextMultiplierBasedOnWidth() *3, fontWeight: FontWeight.w600,color: Color(0xFF575757),),
AppText(episode ?? '',
fontSize: 12)
],
@ -514,7 +510,7 @@ class PatientProfileAppBar extends StatelessWidget
Row(
children: [
AppText('Visit Date: ',
fontSize: 10, fontWeight: FontWeight.w600,color: Color(0xFF575757),),
fontSize: SizeConfig.getTextMultiplierBasedOnWidth() *3, fontWeight: FontWeight.w600,color: Color(0xFF575757),),
AppText(visitDate ?? '',
fontSize: 12)
],
@ -527,7 +523,7 @@ class PatientProfileAppBar extends StatelessWidget
!isPrescriptions
? 'Result Date:'
: 'Prescriptions Date ',
fontSize: 10, fontWeight: FontWeight.w600,color: Color(0xFF575757),
fontSize: SizeConfig.getTextMultiplierBasedOnWidth() *3, fontWeight: FontWeight.w600,color: Color(0xFF575757),
),
AppText(
'${AppDateUtils
@ -535,7 +531,7 @@ class PatientProfileAppBar extends StatelessWidget
appointmentDate,
isArabic: projectViewModel
.isArabic)}',
fontSize: 12,
fontSize: SizeConfig.getTextMultiplierBasedOnWidth() *3.5,
)
],
)
@ -556,6 +552,6 @@ class PatientProfileAppBar extends StatelessWidget
@override
Size get preferredSize =>
Size(double.maxFinite, height == 0
? isInpatient ? (isFromLabResult?200:170) : isAppointmentHeader ? 290 : 170
? isInpatient ? (isFromLabResult?200:170) : isAppointmentHeader ? 290 : SizeConfig.isHeightVeryShort?150:SizeConfig.isHeightShort?180: 170
: height);
}

@ -1,9 +1,12 @@
import 'package:doctor_app_flutter/config/size_config.dart';
import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart';
import 'package:doctor_app_flutter/models/SOAP/master_key_model.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
import '../app_texts_widget.dart';
// ignore: must_be_immutable
class MasterKeyDailog extends StatefulWidget {
final List<MasterKeyModel> list;
@ -33,18 +36,18 @@ class _MasterKeyDailogState extends State<MasterKeyDailog> {
@override
Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context);
return showAlertDialog(context, projectViewModel);
return showAlertDialog(context, projectViewModel);
}
showAlertDialog(BuildContext context, ProjectViewModel projectViewModel) {
// set up the buttons
Widget cancelButton = FlatButton(
child: Text(TranslationBase.of(context).cancel),
child: AppText(TranslationBase.of(context).cancel, color: Colors.grey,fontSize: SizeConfig.getTextMultiplierBasedOnWidth() * 5,),
onPressed: () {
Navigator.of(context).pop();
});
Widget continueButton = FlatButton(
child: Text(this.widget.okText),
child: AppText(this.widget.okText, color: Colors.grey,fontSize: SizeConfig.getTextMultiplierBasedOnWidth() * 5,),
onPressed: () {
this.widget.okFunction(widget.selectedValue);
Navigator.of(context).pop();
@ -69,23 +72,29 @@ class _MasterKeyDailogState extends State<MasterKeyDailog> {
children: [
...widget.list
.map((item) => RadioListTile(
title: Text(
'${projectViewModel.isArabic?item.nameAr:item.nameEn}' + (widget.isICD ? '/${item.code}' : '')),
groupValue: widget.isICD
? widget.selectedValue.code.toString()
: widget.selectedValue.id.toString(),
value: widget.isICD ? widget.selectedValue.code.toString() : item
.id.toString(),
activeColor: Colors.blue.shade700,
selected: widget.isICD ? item.code.toString() ==
widget.selectedValue.code.toString() : item.id.toString() ==
widget.selectedValue.id.toString(),
onChanged: (val) {
setState(() {
widget.selectedValue = item;
});
},
))
title: AppText(
'${projectViewModel.isArabic ? item.nameAr : item.nameEn}' +
(widget.isICD ? '/${item.code}' : ''),
),
groupValue: widget.isICD
? widget.selectedValue.code.toString()
: widget.selectedValue.id.toString(),
value: widget.isICD
? widget.selectedValue.code.toString()
: item.id.toString(),
activeColor: Colors.blue.shade700,
selected: widget.isICD
? item.code.toString() ==
widget.selectedValue.code.toString()
: item.id.toString() ==
widget.selectedValue.id.toString(),
onChanged: (val) {
setState(() {
widget.selectedValue = item;
});
},
))
.toList()
],
),

Loading…
Cancel
Save