stepBackward method

void stepBackward(
  1. Event event,
  2. StepDirective? step
)

Implementation

void stepBackward(Event event, StepDirective? step) {
  // Prevent event from propagating up to the stepper.  This
  // is necessary for a vertical default sized stepper with
  // all jumps allowed, so that the stepper doesn't jump back
  // to the step after clicking the cancel button
  event.preventDefault();
  event.stopPropagation();

  AsyncActionController<bool> ctrl = AsyncActionController<bool>();
  step?.requestStepCancel(ctrl.action!);
  ctrl.execute(() {
    activeStep?.complete = false;
    return _stepTo((activeStepIndex > 1) ? activeStepIndex - 1 : 0);
  });
}