diff --git a/using_stepper/lib/main.dart b/using_stepper/lib/main.dart index 9519831..dff67a0 100644 --- a/using_stepper/lib/main.dart +++ b/using_stepper/lib/main.dart @@ -54,6 +54,12 @@ class MyHomeState extends State { type: StepperType.vertical, // Know the step that is tapped 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 print("onStepTapped : " + step.toString()); },