getQuizOptionValue method
Implementation
String getQuizOptionValue(QuizQuestionModel question, dynamic value) {
if(value == QuizConstants.OTHER_OPTION_KEY) {
return question.other?.getValue() ?? "Autre";
}
for (QuizOptionModel item in question.options ?? []) {
if (item.key == value) {
return item.label;
}
}
return value.toString();
}