nextStep method

void nextStep()

Advances to the next step.

Increments the current step index by 1. Does not validate if the next step exists - callers should check bounds.

Example:

if (controller.value.currentStep < steps.length - 1) {
  controller.nextStep();
}

Implementation

void nextStep() {
  value = StepperValue(
    stepStates: value.stepStates,
    currentStep: value.currentStep + 1,
  );
}