Implement the MultiChoicesQuestion model extending Question. It should be implemented using freezed
MultiChoicesQuestion schema
**Note**: the schema is represented using OpenAPI spec for simplicity.
```yaml
MultipleChoiceQuestion:
description: Representation of a multiple-choice question
allOf:
- $ref: "#/components/schemas/Question"
- properties:
rightAnswerIndex:
description: Indicate the answer index in the options
options:
type: array
minimum: 2
maximum: 4
items:
$ref: "#/components/schemas/MultiChoiceOption"
required:
- rightAnswerIndex
- options
MultiChoiceOption:
properties:
text:
type: string
description: Text to display
tts:
type: string
description: Text to use for the TTS
image:
description: Image asset path of the image to display
type: string
required:
- text
```
Implement a multi-choices question, it should:
adapt between 2, 3 and 4 choices:
2 and 3 options with no images: vertical list of large buttons
As a user, I want a question with 2 to 4 choices
Requirements
Implement the
MultiChoicesQuestion
model extendingQuestion
. It should be implemented using freezed
**Note**: the schema is represented using OpenAPI spec for simplicity. ```yaml MultipleChoiceQuestion: description: Representation of a multiple-choice question allOf: - $ref: "#/components/schemas/Question" - properties: rightAnswerIndex: description: Indicate the answer index in the options options: type: array minimum: 2 maximum: 4 items: $ref: "#/components/schemas/MultiChoiceOption" required: - rightAnswerIndex - options MultiChoiceOption: properties: text: type: string description: Text to display tts: type: string description: Text to use for the TTS image: description: Image asset path of the image to display type: string required: - text ```MultiChoicesQuestion
schemaImplement a multi-choices question, it should:
Design
Question flow
![image](https://github.com/RoadTripMoustache/kana_to_kanji/assets/22211097/823cefac-26fb-425e-a273-9b7a7f1ef08c)Dependencies
Child of #160
Depends on:
180
171
Parents of:
173
174
175
193