fix steps

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

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

@ -68,75 +68,77 @@ class _UpdateSoapIndexState extends State<UpdateSoapIndex>
// baseViewModel: model,
isLoading: _isLoading,
isShowAppBar: false,
body: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container(
decoration: BoxDecoration(
boxShadow: <BoxShadow>[],
color: Theme.of(context).scaffoldBackgroundColor),
child: Column(
mainAxisAlignment: MainAxisAlignment.start,
children: <Widget>[
// PatientPageHeaderWidget(patient),
PatientProfileHeaderNewDesign(patient, '7', '7', height: MediaQuery.of(context).size.height * 0.28,),
Container(
width: double.infinity,
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,
body: SingleChildScrollView(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container(
decoration: BoxDecoration(
boxShadow: <BoxShadow>[],
color: Theme.of(context).scaffoldBackgroundColor),
child: Column(
mainAxisAlignment: MainAxisAlignment.start,
children: <Widget>[
// PatientPageHeaderWidget(patient),
PatientProfileHeaderNewDesign(patient, '7', '7', height: MediaQuery.of(context).size.height * 0.28,),
Container(
width: double.infinity,
height: 1,
color: Color(0xffCCCCCC),
),
),
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)
],
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.20,
),
),
)
],
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