treewide: format

This commit is contained in:
2025-05-19 16:40:37 +02:00
parent 0351b7a9df
commit 155a3aa658
2 changed files with 14 additions and 16 deletions

View File

@@ -27,10 +27,8 @@ List<Character> parseKANJIDICData(XmlElement root) {
jlpt: int.tryParse(
misc.findElements('jlpt').firstOrNull?.innerText ?? '',
),
radicalName: misc
.findElements('rad_name')
.map((e) => e.innerText)
.toList(),
radicalName:
misc.findElements('rad_name').map((e) => e.innerText).toList(),
codepoints: codepoint
?.findElements('cp_value')
.map(
@@ -43,15 +41,15 @@ List<Character> parseKANJIDICData(XmlElement root) {
.toList() ??
[],
radical: radical
?.findElements('rad_value')
.where((e) => e.getAttribute('rad_type') == 'classical')
.map(
(e) => Radical(
kanji: kanji,
radicalId: int.parse(e.innerText),
),
)
.firstOrNull,
?.findElements('rad_value')
.where((e) => e.getAttribute('rad_type') == 'classical')
.map(
(e) => Radical(
kanji: kanji,
radicalId: int.parse(e.innerText),
),
)
.firstOrNull,
strokeMiscounts: misc
.findElements('stroke_count')
.skip(1)

View File

@@ -175,9 +175,9 @@ Future<KanjiSearchResult?> searchKanjiWithDbConnection(
// TODO: Add `volume` and `page` to the entries
final dictionaryReferences = {
for (final entry in dictionary_references)
entry['type'] as String: entry['ref'] as String,
};
for (final entry in dictionary_references)
entry['type'] as String: entry['ref'] as String,
};
final String? grade = {
1: 'grade 1',