As a user, I want to have a question with words to associate
Requirements
Implement the AssociationQuestion and AssociationQuestionPair models. It should be implemented using freezed
AssociationQuestion and AssociationQuestionPair schemas
⚠️ I use OpenAPI spec for simplicity
```yaml
AssociationQuestion:
allOf:
- $ref: "#/components/schemas/Question"
- properties:
pairs:
type: array
minimum: 2
maximum: 5
items:
$ref: "#/components/schemas/AssociationQuestionPair"
required:
- pairs
AssociationQuestionPair:
properties:
knowledgeUpdateIndex:
type: int
description: Index of the knowledge update linked to this pair
left:
type: string
description: Element on the left of the screen
left_tts:
type: string
description: Text to use for the TTS of the left pair
right:
type: string
description: Element on the right of the screen
right_tts:
type: string
description: Text to use for the TTS of the right pair
required:
- left
- right
```
Implement the AssociationQuestionView, it should:
adapt to the number of pairs to display
validate the pair selected and display the correct flow accordingly
move to the next question when everything is answered
Implement the AssociationQuestionViewModel, it should
extends QuestionViewModel
implement a method to validate each pair individually,
trigger the error bottom sheet if the pair selected is incorrect
if correct disable the correct pairs
if all pairs have been matched, skip the success dialog and go to the next question
Design
Full UI flow
![image](https://github.com/RoadTripMoustache/kana_to_kanji/assets/22211097/677a22d7-d39f-48fc-9c22-2c337c5279bc)
As a user, I want to have a question with words to associate
Requirements
Implement the
AssociationQuestion
andAssociationQuestionPair
models. It should be implemented using freezed
⚠️ I use OpenAPI spec for simplicity ```yaml AssociationQuestion: allOf: - $ref: "#/components/schemas/Question" - properties: pairs: type: array minimum: 2 maximum: 5 items: $ref: "#/components/schemas/AssociationQuestionPair" required: - pairs AssociationQuestionPair: properties: knowledgeUpdateIndex: type: int description: Index of the knowledge update linked to this pair left: type: string description: Element on the left of the screen left_tts: type: string description: Text to use for the TTS of the left pair right: type: string description: Element on the right of the screen right_tts: type: string description: Text to use for the TTS of the right pair required: - left - right ```AssociationQuestion
andAssociationQuestionPair
schemasImplement the
AssociationQuestionView
, it should:Implement the
AssociationQuestionViewModel
, it shouldQuestionViewModel
Design
Full UI flow
![image](https://github.com/RoadTripMoustache/kana_to_kanji/assets/22211097/677a22d7-d39f-48fc-9c22-2c337c5279bc)Dependencies
Child of #160
Depends on:
169
180
171
Parent of:
176
177
178
194
Dev notes