assessment fix

merge-requests/451/head
hussam al-habibeh 5 years ago
parent b83c7835b9
commit 3795381e3b

@ -47,24 +47,24 @@ class StepsWidget extends StatelessWidget {
border: index == 0 border: index == 0
? Border.all(color: Color(0xFFCC9B14), width: 2) ? Border.all(color: Color(0xFFCC9B14), width: 2)
: index > 0 : index > 0
? null ? null
: Border.all( : Border.all(
color: Colors.black, width: 0.75), color: Colors.black, width: 0.75),
shape: BoxShape.circle, shape: BoxShape.circle,
color: index == 0 color: index == 0
? Color(0xFFCC9B14) ? Color(0xFFCC9B14)
: index > 0 : index > 0
? Color(0xFF359846) ? Color(0xFF359846)
: Color(0xFFCCCCCC), : Color(0xFFCCCCCC),
), ),
child: Center( child: Center(
child: Icon(FontAwesomeIcons.check, size: 20, child: Icon(
color: Colors.white,) FontAwesomeIcons.check,
), size: 20,
), color: Colors.white,
SizedBox( )),
height:5
), ),
SizedBox(height: 5),
Column( Column(
mainAxisAlignment: MainAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start,
children: [ children: [
@ -73,8 +73,10 @@ class StepsWidget extends StatelessWidget {
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
fontSize: 12, fontSize: 12,
), ),
StatusLabel(selectedStepId: index, stepId: 0,), StatusLabel(
selectedStepId: index,
stepId: 0,
),
], ],
), ),
], ],
@ -83,10 +85,7 @@ class StepsWidget extends StatelessWidget {
), ),
Positioned( Positioned(
top: 50, top: 50,
left: MediaQuery left: MediaQuery.of(context).size.width * 0.28,
.of(context)
.size
.width * 0.28,
child: InkWell( child: InkWell(
onTap: () => index >= 1 ? changeCurrentTab(1) : null, onTap: () => index >= 1 ? changeCurrentTab(1) : null,
child: Column( child: Column(
@ -99,23 +98,25 @@ class StepsWidget extends StatelessWidget {
border: index == 1 border: index == 1
? Border.all(color: Color(0xFFCC9B14), width: 2) ? Border.all(color: Color(0xFFCC9B14), width: 2)
: index > 2 : index > 2
? null ? null
: Border.all( : Border.all(
color: Color(0xFFCCCCCC), width: 0.75), color: Color(0xFFCCCCCC), width: 0.75),
shape: BoxShape.circle, shape: BoxShape.circle,
color: index == 1 color: index == 1
? Color(0xFFCC9B14) ? Color(0xFFCC9B14)
: index > 1 : index > 1
? Color(0xFF359846) ? Color(0xFF359846)
: Color(0xFFCCCCCC), : Color(0xFFCCCCCC),
), ),
child: Center( child: Center(
child: Icon(FontAwesomeIcons.check, size: 20, child: Icon(
color: Colors.white,) FontAwesomeIcons.check,
), size: 20,
color: Colors.white,
)),
), ),
SizedBox( SizedBox(
height:5, height: 5,
), ),
Column( Column(
mainAxisAlignment: MainAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start,
@ -125,9 +126,10 @@ class StepsWidget extends StatelessWidget {
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
fontSize: 12, fontSize: 12,
), ),
StatusLabel(
StatusLabel(selectedStepId: index, stepId: 1,), selectedStepId: index,
stepId: 1,
),
], ],
), ),
], ],
@ -136,14 +138,10 @@ class StepsWidget extends StatelessWidget {
), ),
Positioned( Positioned(
top: 50, top: 50,
left: MediaQuery left: MediaQuery.of(context).size.width * 0.52,
.of(context)
.size
.width * 0.52,
child: InkWell( child: InkWell(
onTap: () { onTap: () {
if (index >= 3) if (index >= 3) changeCurrentTab(2);
changeCurrentTab(2);
}, },
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center,
@ -155,23 +153,25 @@ class StepsWidget extends StatelessWidget {
border: index == 2 border: index == 2
? Border.all(color: Color(0xFFCC9B14), width: 2) ? Border.all(color: Color(0xFFCC9B14), width: 2)
: index > 2 : index > 2
? null ? null
: Border.all( : Border.all(
color: Color(0xFFCCCCCC), width: 0.75), color: Color(0xFFCCCCCC), width: 0.75),
shape: BoxShape.circle, shape: BoxShape.circle,
color: index == 2 color: index == 2
? Color(0xFFCC9B14) ? Color(0xFFCC9B14)
: index > 2 : index > 2
? Color(0xFFCC9B14) ? Color(0xFF359846)
: Color(0xFFCCCCCC), : Color(0xFFCCCCCC),
), ),
child: Center( child: Center(
child: Icon(FontAwesomeIcons.check, size: 20, child: Icon(
color: Colors.white,) FontAwesomeIcons.check,
), size: 20,
color: Colors.white,
)),
), ),
SizedBox( SizedBox(
height:5, height: 5,
), ),
Column( Column(
mainAxisAlignment: MainAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start,
@ -181,7 +181,10 @@ class StepsWidget extends StatelessWidget {
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
fontSize: 12, fontSize: 12,
), ),
StatusLabel(selectedStepId: index, stepId: 2,), StatusLabel(
selectedStepId: index,
stepId: 2,
),
], ],
), ),
], ],
@ -203,38 +206,43 @@ class StepsWidget extends StatelessWidget {
border: index == 3 border: index == 3
? Border.all(color: Color(0xFFCC9B14), width: 2) ? Border.all(color: Color(0xFFCC9B14), width: 2)
: index > 3 : index > 3
? null ? null
: Border.all( : Border.all(
color: Color(0xFFCCCCCC), width: 0.75), color: Color(0xFFCCCCCC), width: 0.75),
shape: BoxShape.circle, shape: BoxShape.circle,
color: index == 3 color: index == 3
? Color(0xFFCC9B14) ? Color(0xFFCC9B14)
: index > 3 : index > 3
? Color(0xFF359846) ? Color(0xFF359846)
: Color(0xFFCCCCCC), : Color(0xFFCCCCCC),
), ),
child: Center( child: Center(
child: Icon(FontAwesomeIcons.check, size: 20, child: Icon(
color: Colors.white,) FontAwesomeIcons.check,
), size: 20,
color: Colors.white,
)),
), ),
SizedBox( SizedBox(
height:5, height: 5,
),
Center(
child: Column(
crossAxisAlignment: CrossAxisAlignment.end,
children: [
AppText(
"Plan",
fontWeight: FontWeight.bold,
textAlign: TextAlign.center,
fontSize: 12,
),
StatusLabel(
selectedStepId: index,
stepId: 3,
),
],
),
), ),
Center(
child: Column(
crossAxisAlignment: CrossAxisAlignment.end,
children: [
AppText(
"Plan",
fontWeight: FontWeight.bold,
textAlign: TextAlign.center,
fontSize: 12,
),
StatusLabel(selectedStepId: index, stepId: 3,),
],
),
),
], ],
), ),
), ),
@ -245,10 +253,7 @@ class StepsWidget extends StatelessWidget {
children: [ children: [
Container( Container(
height: height == 0 ? 150 : height, height: height == 0 ? 150 : height,
width: MediaQuery width: MediaQuery.of(context).size.width,
.of(context)
.size
.width,
color: Colors.transparent, color: Colors.transparent,
child: Center( child: Center(
child: Divider( child: Divider(
@ -273,24 +278,24 @@ class StepsWidget extends StatelessWidget {
border: index == 0 border: index == 0
? Border.all(color: Color(0xFFCC9B14), width: 2) ? Border.all(color: Color(0xFFCC9B14), width: 2)
: index > 0 : index > 0
? null ? null
: Border.all( : Border.all(
color: Colors.black, width: 0.75), color: Colors.black, width: 0.75),
shape: BoxShape.circle, shape: BoxShape.circle,
color: index == 0 color: index == 0
? Color(0xFFCC9B14) ? Color(0xFFCC9B14)
: index > 0 : index > 0
? Color(0xFF359846) ? Color(0xFF359846)
: Color(0xFFCCCCCC), : Color(0xFFCCCCCC),
), ),
child: Center( child: Center(
child: Icon(FontAwesomeIcons.check, size: 20, child: Icon(
color: Colors.white,) FontAwesomeIcons.check,
), size: 20,
), color: Colors.white,
SizedBox( )),
height:5
), ),
SizedBox(height: 5),
AppText( AppText(
"شخصي", "شخصي",
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
@ -302,10 +307,7 @@ class StepsWidget extends StatelessWidget {
), ),
Positioned( Positioned(
top: 50, top: 50,
right: MediaQuery right: MediaQuery.of(context).size.width * 0.28,
.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(
@ -318,28 +320,28 @@ class StepsWidget extends StatelessWidget {
border: index == 1 border: index == 1
? Border.all(color: Color(0xFFCC9B14), width: 2) ? Border.all(color: Color(0xFFCC9B14), width: 2)
: index > 2 : index > 2
? null ? null
: Border.all( : Border.all(
color: Color(0xFFCCCCCC), width: 0.75), color: Color(0xFFCCCCCC), width: 0.75),
shape: BoxShape.circle, shape: BoxShape.circle,
color: index == 1 color: index == 1
? Color(0xFFCC9B14) ? Color(0xFFCC9B14)
: index > 1 : index > 1
? Color(0xFF359846) ? Color(0xFF359846)
: Color(0xFFCCCCCC), : Color(0xFFCCCCCC),
), ),
child: Center( child: Center(
child: Icon(FontAwesomeIcons.check, size: 20, child: Icon(
color: Colors.white,) FontAwesomeIcons.check,
), size: 20,
), color: Colors.white,
SizedBox( )),
height:5
), ),
SizedBox(height: 5),
AppText( AppText(
"هدف", "هدف",
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
fontSize:14, fontSize: 14,
), ),
], ],
), ),
@ -347,10 +349,7 @@ class StepsWidget extends StatelessWidget {
), ),
Positioned( Positioned(
top: 50, top: 50,
right: MediaQuery right: MediaQuery.of(context).size.width * 0.52,
.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(
@ -363,32 +362,33 @@ class StepsWidget extends StatelessWidget {
border: index == 2 border: index == 2
? Border.all(color: Color(0xFFCC9B14), width: 2) ? Border.all(color: Color(0xFFCC9B14), width: 2)
: index > 2 : index > 2
? null ? null
: Border.all( : Border.all(
color: Color(0xFFCCCCCC), width: 0.75), color: Color(0xFFCCCCCC), width: 0.75),
shape: BoxShape.circle, shape: BoxShape.circle,
color: index == 2 color: index == 2
? Color(0xFFCC9B14) ? Color(0xFFCC9B14)
: index > 2 : index > 2
? Color(0xFFCC9B14) ? Color(0xFFCC9B14)
: Color(0xFFCCCCCC), : Color(0xFFCCCCCC),
), ),
child: Center( child: Center(
child: Icon(FontAwesomeIcons.check, size: 20, child: Icon(
color: Colors.white,) FontAwesomeIcons.check,
), size: 20,
color: Colors.white,
)),
), ),
SizedBox( SizedBox(
height:5, height: 5,
), ),
Padding( Padding(
padding: const EdgeInsets.only(right: 2), padding: const EdgeInsets.only(right: 2),
child: AppText( child: AppText(
"تقدير", "تقدير",
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
fontSize:14, fontSize: 14,
), ),
), ),
], ],
), ),
@ -409,44 +409,48 @@ class StepsWidget extends StatelessWidget {
border: index == 3 border: index == 3
? Border.all(color: Color(0xFFCC9B14), width: 2) ? Border.all(color: Color(0xFFCC9B14), width: 2)
: index > 3 : index > 3
? null ? null
: Border.all( : Border.all(
color: Color(0xFFCCCCCC), width: 0.75), color: Color(0xFFCCCCCC), width: 0.75),
shape: BoxShape.circle, shape: BoxShape.circle,
color: index == 3 color: index == 3
? Color(0xFFCC9B14) ? Color(0xFFCC9B14)
: index > 3 : index > 3
? Color(0xFFCC9B14) ? Color(0xFFCC9B14)
: Color(0xFFCCCCCC), : Color(0xFFCCCCCC),
), ),
child: Center( child: Center(
child: Icon(FontAwesomeIcons.check, size: 20, child: Icon(
color: Colors.white,) FontAwesomeIcons.check,
), size: 20,
color: Colors.white,
)),
), ),
SizedBox( SizedBox(
height:5, height: 5,
), ),
Container( Container(
margin: EdgeInsets.only(right:index == 3? 15:0), margin: EdgeInsets.only(right: index == 3 ? 15 : 0),
child: AppText( child: AppText(
"خطة", "خطة",
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
fontSize:14, fontSize: 14,
), ),
), ),
], ],
), ),
), ),
), ),
], ],
); );
} }
} }
class StatusLabel extends StatelessWidget { class StatusLabel extends StatelessWidget {
const StatusLabel({ const StatusLabel({
Key key, this.stepId, this.selectedStepId, Key key,
this.stepId,
this.selectedStepId,
}) : super(key: key); }) : super(key: key);
final int stepId; final int stepId;
@ -458,24 +462,30 @@ class StatusLabel extends StatelessWidget {
width: 65, width: 65,
padding: EdgeInsets.symmetric(horizontal: 2, vertical: 3), padding: EdgeInsets.symmetric(horizontal: 2, vertical: 3),
decoration: BoxDecoration( decoration: BoxDecoration(
color: stepId == selectedStepId ? Color(0xFFF1E9D3) : stepId < color: stepId == selectedStepId
selectedStepId ? Color(0xFFD8E8DB) : Color(0xFFCCCCCC), ? Color(0xFFF1E9D3)
: stepId < selectedStepId
? Color(0xFFD8E8DB)
: Color(0xFFCCCCCC),
borderRadius: BorderRadius.all( borderRadius: BorderRadius.all(
Radius.circular(5.0), Radius.circular(5.0),
), ),
border: Border.all( border: Border.all(color: HexColor('#707070'), width: 0.30),
color: HexColor('#707070'),
width: 0.30),
), ),
child: AppText( child: AppText(
stepId == selectedStepId ? "inProgress" : stepId < selectedStepId stepId == selectedStepId
? "Completed" ? "inProgress"
: " Locked ", : stepId < selectedStepId
? "Completed"
: " Locked ",
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
textAlign: TextAlign.center, textAlign: TextAlign.center,
fontSize: 10, fontSize: 10,
color: stepId == selectedStepId ? Color(0xFFCC9B14) : stepId < color: stepId == selectedStepId
selectedStepId ? Color(0xFF359846) : Color(0xFF969696), ? Color(0xFFCC9B14)
: stepId < selectedStepId
? Color(0xFF359846)
: Color(0xFF969696),
), ),
); );
} }

@ -529,7 +529,7 @@ class _UpdateAssessmentPageState extends State<UpdateAssessmentPage> {
fontWeight: FontWeight.w700, fontWeight: FontWeight.w700,
loading: model.state == ViewState.BusyLocal, loading: model.state == ViewState.BusyLocal,
onPressed: () async { onPressed: () async {
Navigator.pop(context); widget.changePageViewIndex(1);
}, },
), ),
), ),

Loading…
Cancel
Save