setStatus method

void setStatus(
  1. int step,
  2. StepState? state
)

Implementation

void setStatus(int step, StepState? state) {
  Map<int, StepState> newStates = Map.from(value.stepStates);
  if (state == null) {
    newStates.remove(step);
  } else {
    newStates[step] = state;
  }
  value = StepperValue(
    stepStates: newStates,
    currentStep: value.currentStep,
  );
}