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