handlePreviousStep method

void handlePreviousStep()

Goes back to the previous step if the current step is not the first. Resets or recalculates the displayable questions for the new step.

Implementation

void handlePreviousStep() {
  if (!isFirstStep) {
    if (kDebugMode) {
      debugPrint('Passed to previous step');
    }
    _currentStepIndex--;
    computeDisplayableQuestions();
  } else {
    if (kDebugMode) {
      debugPrint('Already at the first step. No action taken.');
    }
  }
}