fix steps

merge-requests/452/head
Elham Rababah 5 years ago
parent ed02bbc1f0
commit a768dd63cf

@ -22,18 +22,21 @@ class StepsWidget extends StatelessWidget {
children: [ children: [
Container( Container(
height: height == 0 ? 150 : height, height: height == 0 ? 150 : height,
width: MediaQuery.of(context).size.width, width: MediaQuery.of(context).size.width * 0.9,
color: Colors.transparent, color: Colors.transparent,
child: Center( child: Center(
child: Divider( child: Container(
color: Colors.grey, width: MediaQuery.of(context).size.width * 0.87,
height: 0.75, child: Divider(
thickness: 0.75, color: Colors.grey,
height: 0.75,
thickness: 0.75,
),
), ),
), ),
), ),
Positioned( Positioned(
top: 50, top: 43,
left: 0, left: 0,
child: InkWell( child: InkWell(
onTap: () => changeCurrentTab(0), onTap: () => changeCurrentTab(0),
@ -84,8 +87,11 @@ class StepsWidget extends StatelessWidget {
), ),
), ),
Positioned( Positioned(
top: 50, top: 43,
left: MediaQuery.of(context).size.width * 0.28, left: MediaQuery
.of(context)
.size
.width * 0.25,
child: InkWell( child: InkWell(
onTap: () => index >= 1 ? changeCurrentTab(1) : null, onTap: () => index >= 1 ? changeCurrentTab(1) : null,
child: Column( child: Column(
@ -137,8 +143,11 @@ class StepsWidget extends StatelessWidget {
), ),
), ),
Positioned( Positioned(
top: 50, top: 43,
left: MediaQuery.of(context).size.width * 0.52, left: MediaQuery
.of(context)
.size
.width * 0.50,
child: InkWell( child: InkWell(
onTap: () { onTap: () {
if (index >= 3) changeCurrentTab(2); if (index >= 3) changeCurrentTab(2);
@ -192,7 +201,7 @@ class StepsWidget extends StatelessWidget {
), ),
), ),
Positioned( Positioned(
top: 50, top: 43,
right: 0, right: 0,
child: InkWell( child: InkWell(
onTap: () => index >= 3 ? changeCurrentTab(4) : null, onTap: () => index >= 3 ? changeCurrentTab(4) : null,
@ -218,30 +227,28 @@ class StepsWidget extends StatelessWidget {
), ),
child: Center( child: Center(
child: Icon( child: Icon(
FontAwesomeIcons.check, FontAwesomeIcons.check,
size: 20, size: 20,
color: Colors.white, color: Colors.white,
)), )),
), ),
SizedBox( SizedBox(
height: 5, height: 5,
), ),
Center( Column(
child: Column( crossAxisAlignment: CrossAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.end, children: [
children: [ AppText(
AppText( "Plan",
"Plan", fontWeight: FontWeight.bold,
fontWeight: FontWeight.bold, // textAlign: TextAlign.center,
textAlign: TextAlign.center, fontSize: 12,
fontSize: 12, ),
), StatusLabel(
StatusLabel( selectedStepId: index,
selectedStepId: index, stepId: 3,
stepId: 3, ),
), ],
],
),
), ),
], ],
), ),
@ -264,7 +271,7 @@ class StepsWidget extends StatelessWidget {
), ),
), ),
Positioned( Positioned(
top: 50, top: 43,
right: 0, right: 0,
child: InkWell( child: InkWell(
onTap: () => changeCurrentTab(0), onTap: () => changeCurrentTab(0),
@ -286,28 +293,39 @@ class StepsWidget extends StatelessWidget {
? Color(0xFFCC9B14) ? Color(0xFFCC9B14)
: index > 0 : index > 0
? Color(0xFF359846) ? Color(0xFF359846)
: Color(0xFFCCCCCC), : Color(0xFFCCCCCC),
), ),
child: Center( child: Center(
child: Icon( child: Icon(
FontAwesomeIcons.check, FontAwesomeIcons.check,
size: 20, size: 20,
color: Colors.white, color: Colors.white,
)), )),
), ),
SizedBox(height: 5), SizedBox(height: 5),
AppText( Column(
"شخصي", children: [
fontWeight: FontWeight.bold, AppText(
fontSize: 16, "شخصي",
fontWeight: FontWeight.bold,
fontSize: 16,
),
StatusLabel(
selectedStepId: index,
stepId: 0,
),
],
), ),
], ],
), ),
), ),
), ),
Positioned( Positioned(
top: 50, top: 43,
right: MediaQuery.of(context).size.width * 0.28, right: MediaQuery
.of(context)
.size
.width * 0.28,
child: InkWell( child: InkWell(
onTap: () => index >= 2 ? changeCurrentTab(1) : null, onTap: () => index >= 2 ? changeCurrentTab(1) : null,
child: Column( child: Column(
@ -328,28 +346,39 @@ class StepsWidget extends StatelessWidget {
? Color(0xFFCC9B14) ? Color(0xFFCC9B14)
: index > 1 : index > 1
? Color(0xFF359846) ? Color(0xFF359846)
: Color(0xFFCCCCCC), : Color(0xFFCCCCCC),
), ),
child: Center( child: Center(
child: Icon( child: Icon(
FontAwesomeIcons.check, FontAwesomeIcons.check,
size: 20, size: 20,
color: Colors.white, color: Colors.white,
)), )),
), ),
SizedBox(height: 5), SizedBox(height: 5),
AppText( Column(
"هدف", children: [
fontWeight: FontWeight.bold, AppText(
fontSize: 14, "هدف",
fontWeight: FontWeight.bold,
fontSize: 14,
),
StatusLabel(
selectedStepId: index,
stepId: 1,
),
],
), ),
], ],
), ),
), ),
), ),
Positioned( Positioned(
top: 50, top: 43,
right: MediaQuery.of(context).size.width * 0.52, right: MediaQuery
.of(context)
.size
.width * 0.52,
child: InkWell( child: InkWell(
onTap: () => index >= 3 ? changeCurrentTab(2) : null, onTap: () => index >= 3 ? changeCurrentTab(2) : null,
child: Column( child: Column(
@ -384,10 +413,18 @@ class StepsWidget extends StatelessWidget {
), ),
Padding( Padding(
padding: const EdgeInsets.only(right: 2), padding: const EdgeInsets.only(right: 2),
child: AppText( child: Column(
"تقدير", children: [
fontWeight: FontWeight.bold, AppText(
fontSize: 14, "تقدير",
fontWeight: FontWeight.bold,
fontSize: 14,
),
StatusLabel(
selectedStepId: index,
stepId: 2,
),
],
), ),
), ),
], ],
@ -395,12 +432,12 @@ class StepsWidget extends StatelessWidget {
), ),
), ),
Positioned( Positioned(
top: 50, top: 43,
left: 0, left: 0,
child: InkWell( child: InkWell(
onTap: () => index >= 3 ? changeCurrentTab(4) : null, onTap: () => index >= 3 ? changeCurrentTab(4) : null,
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.end,
children: [ children: [
Container( Container(
width: 38, width: 38,
@ -431,10 +468,18 @@ class StepsWidget extends StatelessWidget {
), ),
Container( Container(
margin: EdgeInsets.only(right: index == 3 ? 15 : 0), margin: EdgeInsets.only(right: index == 3 ? 15 : 0),
child: AppText( child: Column(
"خطة", children: [
fontWeight: FontWeight.bold, AppText(
fontSize: 14, "خطة",
fontWeight: FontWeight.bold,
fontSize: 14,
),
StatusLabel(
selectedStepId: index,
stepId: 3,
),
],
), ),
), ),
], ],

@ -68,75 +68,77 @@ class _UpdateSoapIndexState extends State<UpdateSoapIndex>
// baseViewModel: model, // baseViewModel: model,
isLoading: _isLoading, isLoading: _isLoading,
isShowAppBar: false, isShowAppBar: false,
body: Column( body: SingleChildScrollView(
crossAxisAlignment: CrossAxisAlignment.start, child: Column(
children: [ crossAxisAlignment: CrossAxisAlignment.start,
Container( children: [
decoration: BoxDecoration( Container(
boxShadow: <BoxShadow>[], decoration: BoxDecoration(
color: Theme.of(context).scaffoldBackgroundColor), boxShadow: <BoxShadow>[],
child: Column( color: Theme.of(context).scaffoldBackgroundColor),
mainAxisAlignment: MainAxisAlignment.start, child: Column(
children: <Widget>[ mainAxisAlignment: MainAxisAlignment.start,
// PatientPageHeaderWidget(patient), children: <Widget>[
PatientProfileHeaderNewDesign(patient, '7', '7', height: MediaQuery.of(context).size.height * 0.28,), // PatientPageHeaderWidget(patient),
Container( PatientProfileHeaderNewDesign(patient, '7', '7', height: MediaQuery.of(context).size.height * 0.28,),
width: double.infinity, Container(
height: 1, width: double.infinity,
color: Color(0xffCCCCCC), height: 1,
), color: Color(0xffCCCCCC),
Container(
color: Theme.of(context).scaffoldBackgroundColor,
margin: EdgeInsets.only(
left: MediaQuery.of(context).size.width * 0.05,
right: MediaQuery.of(context).size.width * 0.05),
child: StepsWidget(
index: _currentIndex,
changeCurrentTab: changePageViewIndex,
height: MediaQuery.of(context).size.height * 0.21,
), ),
), Container(
Container( color: Theme.of(context).scaffoldBackgroundColor,
color: Theme.of(context).scaffoldBackgroundColor, margin: EdgeInsets.only(
height: MediaQuery.of(context).size.height * 0.50, left: MediaQuery.of(context).size.width * 0.05,
child: PageView( right: MediaQuery.of(context).size.width * 0.05),
physics: NeverScrollableScrollPhysics(), child: StepsWidget(
controller: _controller, index: _currentIndex,
onPageChanged: (index) { changeCurrentTab: changePageViewIndex,
setState(() { height: MediaQuery.of(context).size.height * 0.20,
_currentIndex = index; ),
});
},
scrollDirection: Axis.horizontal,
children: <Widget>[
UpdateSubjectivePage(
changePageViewIndex: changePageViewIndex,
myAllergiesList: myAllergiesList,
myHistoryList: myHistoryList,
patientInfo: patient,
changeLoadingState: changeLoadingState),
UpdateObjectivePage(
changePageViewIndex: changePageViewIndex,
mySelectedExamination: mySelectedExamination,
patientInfo: patient,
changeLoadingState: changeLoadingState),
UpdateAssessmentPage(
changePageViewIndex: changePageViewIndex,
mySelectedAssessmentList: mySelectedAssessment,
patientInfo: patient,
changeLoadingState: changeLoadingState),
UpdatePlanPage(
changePageViewIndex: changePageViewIndex,
patientInfo: patient,
patientProgressNote: patientProgressNote,
changeLoadingState: changeLoadingState)
],
), ),
) Container(
], color: Theme.of(context).scaffoldBackgroundColor,
height: MediaQuery.of(context).size.height * 0.50,
child: PageView(
physics: NeverScrollableScrollPhysics(),
controller: _controller,
onPageChanged: (index) {
setState(() {
_currentIndex = index;
});
},
scrollDirection: Axis.horizontal,
children: <Widget>[
UpdateSubjectivePage(
changePageViewIndex: changePageViewIndex,
myAllergiesList: myAllergiesList,
myHistoryList: myHistoryList,
patientInfo: patient,
changeLoadingState: changeLoadingState),
UpdateObjectivePage(
changePageViewIndex: changePageViewIndex,
mySelectedExamination: mySelectedExamination,
patientInfo: patient,
changeLoadingState: changeLoadingState),
UpdateAssessmentPage(
changePageViewIndex: changePageViewIndex,
mySelectedAssessmentList: mySelectedAssessment,
patientInfo: patient,
changeLoadingState: changeLoadingState),
UpdatePlanPage(
changePageViewIndex: changePageViewIndex,
patientInfo: patient,
patientProgressNote: patientProgressNote,
changeLoadingState: changeLoadingState)
],
),
)
],
),
), ),
), ],
], ),
), ),
), ),
); );

Loading…
Cancel
Save