fix: stepper registration
This commit is contained in:
parent
466d49312d
commit
a35110af71
|
@ -24,13 +24,13 @@ class SubmissionParent extends StatefulWidget {
|
||||||
}
|
}
|
||||||
|
|
||||||
class _SubmissionParentState extends State<SubmissionParent> {
|
class _SubmissionParentState extends State<SubmissionParent> {
|
||||||
Widget _stepItem({bool isCurrentStep = false, bool isDone = false}) {
|
Widget _stepItem({bool isCurrentStep = false}) {
|
||||||
return Container(
|
return Container(
|
||||||
margin: const EdgeInsets.only(right: 0.0, left: 4.0),
|
margin: const EdgeInsets.only(right: 0.0, left: 4.0),
|
||||||
height: 6,
|
height: 6,
|
||||||
width: SizeConfig.width * .08,
|
width: SizeConfig.width * .08,
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: isCurrentStep || isDone
|
color: isCurrentStep
|
||||||
? ColorPalette.primary
|
? ColorPalette.primary
|
||||||
: ColorPalette.greyBorderNeutrals,
|
: ColorPalette.greyBorderNeutrals,
|
||||||
borderRadius: BorderRadius.circular(50),
|
borderRadius: BorderRadius.circular(50),
|
||||||
|
@ -91,15 +91,10 @@ class _SubmissionParentState extends State<SubmissionParent> {
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
children:
|
children:
|
||||||
List.generate(provider.stepAmount, (index) {
|
List.generate(provider.stepAmount, (index) {
|
||||||
// print('indd $index');
|
|
||||||
// print(
|
|
||||||
// 'getCurrentStep ${provider.getCurrentStep}');
|
|
||||||
return _stepItem(
|
return _stepItem(
|
||||||
isCurrentStep: provider.getCurrentStep ==
|
isCurrentStep:
|
||||||
index + 1 ||
|
provider.getCurrentStep == index + 1 ||
|
||||||
provider.getCurrentStep - 1 == index + 1,
|
provider.getCurrentStep - 1 > index,
|
||||||
// isDone:
|
|
||||||
// index + 1 != provider.getCurrentStep + 1,
|
|
||||||
);
|
);
|
||||||
}),
|
}),
|
||||||
),
|
),
|
||||||
|
|
Loading…
Reference in New Issue
Block a user