explanation

This commit is contained in:
gitea
2026-02-03 19:34:33 +01:00
parent cd3b75995d
commit 82be8dbdf3
7 changed files with 55 additions and 0 deletions
+2
View File
@@ -66,6 +66,7 @@ class DeckStorage {
'questions': deck.questions.map((q) => {
'id': q.id,
'prompt': q.prompt,
if (q.explanation != null && q.explanation!.isNotEmpty) 'explanation': q.explanation,
'answers': q.answers,
'correctAnswerIndices': q.correctAnswerIndices,
'consecutiveCorrect': q.consecutiveCorrect,
@@ -133,6 +134,7 @@ class DeckStorage {
return Question(
id: questionMap['id'] as String? ?? '',
prompt: questionMap['prompt'] as String? ?? '',
explanation: questionMap['explanation'] as String?,
answers: (questionMap['answers'] as List<dynamic>?)
?.map((e) => e.toString())
.toList() ??