mirror of
https://github.com/nisrulz/flutter-examples.git
synced 2025-09-21 07:47:15 +08:00
enabled jumping to the tapped step in the using_stepper example
This commit is contained in:
@ -54,6 +54,12 @@ class MyHomeState extends State<MyHome> {
|
|||||||
type: StepperType.vertical,
|
type: StepperType.vertical,
|
||||||
// Know the step that is tapped
|
// Know the step that is tapped
|
||||||
onStepTapped: (step) {
|
onStepTapped: (step) {
|
||||||
|
// On hitting step itself, change the state and jump to that step
|
||||||
|
setState(() {
|
||||||
|
// update the variable handling the current step value
|
||||||
|
// jump to the tapped step
|
||||||
|
current_step = step;
|
||||||
|
});
|
||||||
// Log function call
|
// Log function call
|
||||||
print("onStepTapped : " + step.toString());
|
print("onStepTapped : " + step.toString());
|
||||||
},
|
},
|
||||||
|
Reference in New Issue
Block a user