themes
This commit is contained in:
@@ -3,7 +3,7 @@ enum QuizMode { kanjiToEnglish, englishToKanji, reading }
|
||||
class SrsItem {
|
||||
final int kanjiId;
|
||||
final QuizMode quizMode;
|
||||
final String? readingType; // 'onyomi' or 'kunyomi'
|
||||
final String? readingType;
|
||||
int srsStage;
|
||||
DateTime lastAsked;
|
||||
|
||||
@@ -116,13 +116,14 @@ class VocabularyItem {
|
||||
final List<PronunciationAudio> pronunciationAudios;
|
||||
final Map<String, VocabSrsItem> srsItems = {};
|
||||
|
||||
VocabularyItem(
|
||||
{required this.id,
|
||||
required this.level,
|
||||
required this.characters,
|
||||
required this.meanings,
|
||||
required this.readings,
|
||||
required this.pronunciationAudios});
|
||||
VocabularyItem({
|
||||
required this.id,
|
||||
required this.level,
|
||||
required this.characters,
|
||||
required this.meanings,
|
||||
required this.readings,
|
||||
required this.pronunciationAudios,
|
||||
});
|
||||
|
||||
factory VocabularyItem.fromSubject(Map<String, dynamic> subj) {
|
||||
final int id = subj['id'] as int;
|
||||
@@ -152,20 +153,18 @@ class VocabularyItem {
|
||||
final gender = metadata?['gender'] as String?;
|
||||
|
||||
if (url != null && gender != null) {
|
||||
pronunciationAudios.add(PronunciationAudio(
|
||||
url: url,
|
||||
gender: gender,
|
||||
));
|
||||
pronunciationAudios.add(PronunciationAudio(url: url, gender: gender));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return VocabularyItem(
|
||||
id: id,
|
||||
level: level,
|
||||
characters: characters,
|
||||
meanings: meanings,
|
||||
readings: readings,
|
||||
pronunciationAudios: pronunciationAudios);
|
||||
id: id,
|
||||
level: level,
|
||||
characters: characters,
|
||||
meanings: meanings,
|
||||
readings: readings,
|
||||
pronunciationAudios: pronunciationAudios,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user