Skip to content

Instantly share code, notes, and snippets.

@becek2n
Created May 8, 2020 16:10
Show Gist options
  • Save becek2n/d6ced6e8af45d9a9b2c9c141b4895690 to your computer and use it in GitHub Desktop.
Save becek2n/d6ced6e8af45d9a9b2c9c141b4895690 to your computer and use it in GitHub Desktop.
int currentStep = 0;
List<Step> spr = <Step>[];
List<Step> _getSteps() {
spr = <Step>[
Step(
state: _getState(1),
title: Text("Step 1"),
content: new Wrap(
children:<Widget>[
StepOneView()
],
),
isActive: (currentStep == 0 ? true : false)
),
Step(
title: Text("Step 2"),
content: new Wrap(
children:<Widget>[
StepTwoView()
],
),
isActive: (currentStep == 1 ? true : false),
state: _getState(2),
)
];
return spr;
}
StepState _getState(int i) {
if (currentStep >= i)
return StepState.complete;
else
return StepState.indexed;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment