goToStep method

void goToStep(
  1. int stepIndex
)

Go to a specific step by index

Implementation

void goToStep(int stepIndex) {
  if (stepIndex >= 0 && stepIndex < steps.length) {
    _currentStepIndex = stepIndex;
    _showStep();
    onStepChange?.call(_currentStepIndex, steps[_currentStepIndex]);
  }
}