currentDisplayableQuestion property

QuizQuestionModel get currentDisplayableQuestion

Returns the currently displayed question within the current step. Asserts if the question index is out of bounds.

Implementation

QuizQuestionModel get currentDisplayableQuestion {
  final displayableQuestions = steps[_currentStepIndex].displayableQuestions;
  assert(_currentQuestionIndex >= 0 && _currentQuestionIndex < displayableQuestions.length, '🚩 Question index $_currentQuestionIndex is out of bounds for step $_currentStepIndex (0..${displayableQuestions.length - 1})');
  return displayableQuestions[_currentQuestionIndex];
}