lib/search/kanji: make taughtIn into int?
This commit is contained in:
@@ -7,7 +7,8 @@ class KanjiSearchResult extends Equatable {
|
||||
final String kanji;
|
||||
|
||||
/// The school level that the kanji is taught in, if applicable.
|
||||
final String? taughtIn;
|
||||
/// Ranges from `1` to `10` (except 7)
|
||||
final int? taughtIn;
|
||||
|
||||
/// The lowest JLPT exam that this kanji is likely to appear in, if applicable.
|
||||
///
|
||||
@@ -121,10 +122,6 @@ class KanjiSearchResult extends Equatable {
|
||||
// 'kunyomiExamples': kunyomiExamples,
|
||||
'radical': radical?.toJson(),
|
||||
'parts': parts,
|
||||
// 'strokeOrderDiagramUri': strokeOrderDiagramUri,
|
||||
// 'strokeOrderSvgUri': strokeOrderSvgUri,
|
||||
// 'strokeOrderGifUri': strokeOrderGifUri,
|
||||
// 'uri': uri,
|
||||
'codepoints': codepoints,
|
||||
'nanori': nanori,
|
||||
'alternativeLanguageReadings': alternativeLanguageReadings,
|
||||
@@ -136,7 +133,7 @@ class KanjiSearchResult extends Equatable {
|
||||
factory KanjiSearchResult.fromJson(Map<String, dynamic> json) {
|
||||
return KanjiSearchResult(
|
||||
kanji: json['kanji'] as String,
|
||||
taughtIn: json['taughtIn'] as String?,
|
||||
taughtIn: json['taughtIn'] as int?,
|
||||
jlptLevel: json['jlptLevel'] as String?,
|
||||
newspaperFrequencyRank: json['newspaperFrequencyRank'] as int?,
|
||||
strokeCount: json['strokeCount'] as int,
|
||||
|
||||
Reference in New Issue
Block a user