Implement a MultiChoicesQuestion view, under src/practice/questions:
constructor takes:
MultiChoiceQuestion question
Function(bool askAgain) onAnswered
use the MultiChoicesQuestionViewModel
UI use the QuestionSkeleton as a wrapper:
display the right instruction based on question.type usingQuestionSkeleton.instruction
display the question subject based on question.subject using Subject
if question.subject_tts is provided add an IconButton (icon: Icons.volume_up_rounded). When pressed call the TTS service with question.subject_tts
display all the options (using MultiChoiceOptionTile) according to their number (use isCompact when there are less than 4 options), onPressed: viewModel.onOptionPressed
Requirements
Implement the
MultiChoicesQuestionView
, it should:What needs to be done
Implement a
MultiChoicesQuestion
view, undersrc/practice/questions
:MultiChoiceQuestion question
Function(bool askAgain) onAnswered
MultiChoicesQuestionViewModel
QuestionSkeleton
as a wrapper:question.type
usingQuestionSkeleton.instruction
question.subject
usingSubject
question.subject_tts
is provided add an IconButton (icon:Icons.volume_up_rounded
). When pressed call the TTS service withquestion.subject_tts
MultiChoiceOptionTile
) according to their number (useisCompact
when there are less than 4 options),onPressed: viewModel.onOptionPressed
Design
![image](https://github.com/RoadTripMoustache/kana_to_kanji/assets/22211097/823cefac-26fb-425e-a273-9b7a7f1ef08c)MultiChoicesQuestionView
flowsDependencies
Child of #168
Depends on:
169
173
174
180