Created
May 8, 2020 16:10
-
-
Save becek2n/d6ced6e8af45d9a9b2c9c141b4895690 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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