handleNextQuestion method

void handleNextQuestion()

Advances to the next question in question_by_question mode. If at the last question of the current step, proceeds to the first question of the next step.

Implementation

void handleNextQuestion() {
  final questions = currentDisplayedStep.displayableQuestions;
  assert(questions.isNotEmpty, '🚩 Current step should have at least one question');

  if (!isLastStepQuestion) {
    _currentQuestionIndex++;
  } else {
    _currentQuestionIndex = 0;
    debugPrint('Is last step question, need to go to next Step');
    handleNextStep();
  }

  computeDisplayableQuestions();
}