Open apomalyn opened 2 months ago
Implement a QuizRecapitulationViewModel that:
QuizRecapitulationViewModel
Under src/practice/quiz/recapitulation/models, create a Recapitulation model using freezed, it should have the following properties:
src/practice/quiz/recapitulation/models
Recapitulation
KnowledgeUpdate knowledgeUpdate
bool? skipped = false
String questionSubject
String expectedAnswer
Under src/practice/quiz/recapitulation, create a QuizRecapitulationViewModel:
src/practice/quiz/recapitulation
FutureViewModel
double grade
List<Recapitulation> recapitulations
int? streak
int? newWords
GoRouter router
List<Question> questions
grade
questions[].knowledgeUpdates[].grade
recapitulations
questions
knowledgeUpdate.grade
streak
user.streak_last_update
futureToRun
KnowledgeUpdate
onContinuePressed
/practice
PracticeView.routeName
Child of #210
Depends on:
Requirements
Implement a
QuizRecapitulationViewModel
that:What needs to be done
Under
src/practice/quiz/recapitulation/models
, create aRecapitulation
model using freezed, it should have the following properties:KnowledgeUpdate knowledgeUpdate
bool? skipped = false
String questionSubject
: notion or word evaluated in the questionString expectedAnswer
Under
src/practice/quiz/recapitulation
, create aQuizRecapitulationViewModel
:FutureViewModel
double grade
List<Recapitulation> recapitulations
int? streak
: null if there isn't a streak updateint? newWords
: null if there isn't new words on the quizGoRouter router
List<Question> questions
grade
(sum allquestions[].knowledgeUpdates[].grade
and get a percentage out of it)recapitulations
based on thequestions
, order the list byknowledgeUpdate.grade
, compile all duplicated knowledge level by doing an averagestreak
ifuser.streak_last_update
is older than todayfutureToRun
should:KnowledgeUpdate
fromrecapitulations
onContinuePressed
method that redirects to/practice
(PracticeView.routeName
)Dependencies
Child of #210
Depends on:
167
233
Dev notes