From 7c3f205d5d0551eb3c66bbc5cc7ae1c986a347c8 Mon Sep 17 00:00:00 2001 From: Nishant Srivastava Date: Fri, 25 Aug 2017 21:30:15 -0700 Subject: [PATCH] enabled jumping to the tapped step in the using_stepper example --- using_stepper/lib/main.dart | 6 ++++++ 1 file changed, 6 insertions(+) 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()); },