QuizModel class
Constructors
- QuizModel.fromQuizDetailsDTO(QuizDetailsDTO quiz)
-
QuizModel.fromSteps(List<
QuizStepModel> quizSteps) -
QuizModel.fromTemplateJson(Map<
String, dynamic> json)
Properties
- currentDisplayableQuestion → QuizQuestionModel
-
Returns the currently displayed question within the current step.
Asserts if the question index is out of bounds.
no setter
- currentDisplayedStep → QuizStepModel
-
Returns the currently displayed step model.
Asserts if the current step index is out of range.
no setter
- dictionnary ↔ QuizDictionnary
-
getter/setter pair
- hashCode → int
-
The hash code for this object.
no setterinherited
- hasUnfinishedIntroStepper → bool
-
no setter
- introStepper ↔ QuizInformationStepperModel?
-
getter/setter pair
- isAtVeryFirstQuestion → bool
-
Returns
trueif the current step and question indices are both at 0. This means we are at the very first question of the quiz.no setter - isFirstStep → bool
-
Returns
trueif the current step is the first one.no setter - isFirstStepQuestion → bool
-
Returns
trueif the current question within the step is the first one.no setter - isLastStep → bool
-
Returns
trueif the current step is the last one.no setter - isLastStepQuestion → bool
-
Returns
trueif the current question is the last in the current step.no setter - loggerPrefix → String
-
final
- quizSubTitle ↔ String?
-
getter/setter pair
- quizTitle ↔ String?
-
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- showBottomActions ↔ bool
-
getter/setter pair
- showGoToPrevious → bool
-
Determines if the "Go to Previous" action should be shown.
It's hidden only if the user is at the very first question of the quiz.
no setter
- stepperDisplayMode ↔ String?
-
getter/setter pair
- steppingModeType ↔ QuizSteppingModeTypes
-
getter/setter pair
-
steps
↔ List<
QuizStepModel> -
getter/setter pair
- theme ↔ QuizTheming
-
getter/setter pair
- timer ↔ QuizTimerModel
-
getter/setter pair
Methods
-
computeDisplayableQuestions(
) → void -
fillQuizResponse(
) → void - Cette fonction permet de completer le quiz Template à partir des réponses fournies par l'utilisateur et sauvergé sur l'api
-
getAllStepsAnswerableQuestions(
) → List< QuizQuestionModel> -
getCurrentQuestionIndex(
) → int -
getCurrentStepIndex(
) → int -
getDisplayCondition(
DisplayConditionModel? displayCondition) → bool -
getNextButtonText(
) → String -
getPutQuizResponseInput(
String newStatus) → PutQuizResponseInput - to compute DTO object to put new answers
-
getQuestionIndexInAllStepsAnswerables(
QuizQuestionModel questionToFind) → int -
getQuestionsOnlyCompletionRate(
) → double - This method is used to compute the completion bar when in question_by_question mode
-
getQuizIntegrityInformations(
BuildContext context) → QuizIntegrityInformations -
handleNextQuestion(
) → void -
Advances to the next question in
question_by_questionmode. If at the last question of the current step, proceeds to the first question of the next step. -
handleNextStep(
) → void - Advances to the next step if the current step is not the last. Resets or recalculates the displayable questions for the new step.
-
handlePreviousQuestion(
) → void -
Goes to the previous question in
question_by_questionmode. If at the first question of the current step, goes to the last question of the previous step. -
handlePreviousStep(
) → void - Goes back to the previous step if the current step is not the first. Resets or recalculates the displayable questions for the new step.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
setCurrentStepFromApi(
String? stepFromApi) → void -
setCurrentStepQuestionFromApi(
String? questionFromApi) → void -
setUserResponses(
Map< String, dynamic> responses) → void -
toJson(
) → Map< String, dynamic> -
toString(
) → String -
A string representation of this object.
inherited
-
updateResponse(
{required String questionKey, required dynamic responseValue}) → void
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
initFromParticipationsDTO(
ParticipationDetailsDTO participation) → QuizModel -
initFromSteps(
List< QuizStepModel> quizSteps) → QuizModel -
initFromStringToParse(
String stringToParse) → QuizModel -
initFromTemplate(
Map< String, dynamic> template) → QuizModel