lib: format

This commit is contained in:
2025-05-16 21:06:19 +02:00
parent 84ae7eca9e
commit 3f267b78d3
16 changed files with 360 additions and 96 deletions

View File

@@ -24,8 +24,7 @@ enum JMdictDialect {
required this.description,
});
static JMdictDialect fromId(String id) =>
JMdictDialect.values.firstWhere(
static JMdictDialect fromId(String id) => JMdictDialect.values.firstWhere(
(e) => e.id == id,
orElse: () => throw Exception('Unknown id: $id'),
);

View File

@@ -107,8 +107,7 @@ enum JMdictField {
required this.description,
});
static JMdictField fromId(String id) =>
JMdictField.values.firstWhere(
static JMdictField fromId(String id) => JMdictField.values.firstWhere(
(e) => e.id == id,
orElse: () => throw Exception('Unknown id: $id'),
);

View File

@@ -18,8 +18,7 @@ enum JMdictKanjiInfo {
required this.description,
});
static JMdictKanjiInfo fromId(String id) =>
JMdictKanjiInfo.values.firstWhere(
static JMdictKanjiInfo fromId(String id) => JMdictKanjiInfo.values.firstWhere(
(e) => e.id == id,
orElse: () => throw Exception('Unknown id: $id'),
);

View File

@@ -79,8 +79,7 @@ enum JMdictMisc {
required this.description,
});
static JMdictMisc fromId(String id) =>
JMdictMisc.values.firstWhere(
static JMdictMisc fromId(String id) => JMdictMisc.values.firstWhere(
(e) => e.id == id,
orElse: () => throw Exception('Unknown id: $id'),
);

View File

@@ -7,14 +7,18 @@ enum JMdictPOS {
adjIx(id: 'adj-ix', description: 'adjective (keiyoushi) - yoi/ii class'),
adjKari(id: 'adj-kari', description: '\'kari\' adjective (archaic)'),
adjKu(id: 'adj-ku', description: '\'ku\' adjective (archaic)'),
adjNa(id: 'adj-na', description: 'adjectival nouns or quasi-adjectives (keiyodoshi)'),
adjNa(
id: 'adj-na',
description: 'adjectival nouns or quasi-adjectives (keiyodoshi)'),
adjNari(id: 'adj-nari', description: 'archaic/formal form of na-adjective'),
adjNo(id: 'adj-no', description: 'nouns which may take the genitive case particle ''no'''),
adjNo(
id: 'adj-no',
description: 'nouns which may take the genitive case particle ' 'no' ''),
adjPn(id: 'adj-pn', description: 'pre-noun adjectival (rentaishi)'),
adjShiku(id: 'adj-shiku', description: '\'shiku\' adjective (archaic)'),
adjT(id: 'adj-t', description: '\'taru\' adjective'),
adv(id: 'adv', description: 'adverb (fukushi)'),
advTo(id: 'adv-to', description: 'adverb taking the ''to'' particle'),
advTo(id: 'adv-to', description: 'adverb taking the ' 'to' ' particle'),
aux(id: 'aux', description: 'auxiliary'),
auxAdj(id: 'aux-adj', description: 'auxiliary adjective'),
auxV(id: 'aux-v', description: 'auxiliary verb'),
@@ -38,62 +42,123 @@ enum JMdictPOS {
vUnspec(id: 'v-unspec', description: 'verb unspecified'),
v1(id: 'v1', description: 'Ichidan verb'),
v1S(id: 'v1-s', description: 'Ichidan verb - kureru special class'),
v2aS(id: 'v2a-s', description: 'Nidan verb with ''u'' ending (archaic)'),
v2bK(id: 'v2b-k', description: 'Nidan verb (upper class) with ''bu'' ending (archaic)'),
v2bS(id: 'v2b-s', description: 'Nidan verb (lower class) with ''bu'' ending (archaic)'),
v2dK(id: 'v2d-k', description: 'Nidan verb (upper class) with ''dzu'' ending (archaic)'),
v2dS(id: 'v2d-s', description: 'Nidan verb (lower class) with ''dzu'' ending (archaic)'),
v2gK(id: 'v2g-k', description: 'Nidan verb (upper class) with ''gu'' ending (archaic)'),
v2gS(id: 'v2g-s', description: 'Nidan verb (lower class) with ''gu'' ending (archaic)'),
v2hK(id: 'v2h-k', description: 'Nidan verb (upper class) with ''hu/fu'' ending (archaic)'),
v2hS(id: 'v2h-s', description: 'Nidan verb (lower class) with ''hu/fu'' ending (archaic)'),
v2kK(id: 'v2k-k', description: 'Nidan verb (upper class) with ''ku'' ending (archaic)'),
v2kS(id: 'v2k-s', description: 'Nidan verb (lower class) with ''ku'' ending (archaic)'),
v2mK(id: 'v2m-k', description: 'Nidan verb (upper class) with ''mu'' ending (archaic)'),
v2mS(id: 'v2m-s', description: 'Nidan verb (lower class) with ''mu'' ending (archaic)'),
v2nS(id: 'v2n-s', description: 'Nidan verb (lower class) with ''nu'' ending (archaic)'),
v2rK(id: 'v2r-k', description: 'Nidan verb (upper class) with ''ru'' ending (archaic)'),
v2rS(id: 'v2r-s', description: 'Nidan verb (lower class) with ''ru'' ending (archaic)'),
v2sS(id: 'v2s-s', description: 'Nidan verb (lower class) with ''su'' ending (archaic)'),
v2tK(id: 'v2t-k', description: 'Nidan verb (upper class) with ''tsu'' ending (archaic)'),
v2tS(id: 'v2t-s', description: 'Nidan verb (lower class) with ''tsu'' ending (archaic)'),
v2wS(id: 'v2w-s', description: 'Nidan verb (lower class) with ''u'' ending and ''we'' conjugation (archaic)'),
v2yK(id: 'v2y-k', description: 'Nidan verb (upper class) with ''yu'' ending (archaic)'),
v2yS(id: 'v2y-s', description: 'Nidan verb (lower class) with ''yu'' ending (archaic)'),
v2zS(id: 'v2z-s', description: 'Nidan verb (lower class) with ''zu'' ending (archaic)'),
v4b(id: 'v4b', description: 'Yodan verb with ''bu'' ending (archaic)'),
v4g(id: 'v4g', description: 'Yodan verb with ''gu'' ending (archaic)'),
v4h(id: 'v4h', description: 'Yodan verb with ''hu/fu'' ending (archaic)'),
v4k(id: 'v4k', description: 'Yodan verb with ''ku'' ending (archaic)'),
v4m(id: 'v4m', description: 'Yodan verb with ''mu'' ending (archaic)'),
v4n(id: 'v4n', description: 'Yodan verb with ''nu'' ending (archaic)'),
v4r(id: 'v4r', description: 'Yodan verb with ''ru'' ending (archaic)'),
v4s(id: 'v4s', description: 'Yodan verb with ''su'' ending (archaic)'),
v4t(id: 'v4t', description: 'Yodan verb with ''tsu'' ending (archaic)'),
v2aS(id: 'v2a-s', description: 'Nidan verb with ' 'u' ' ending (archaic)'),
v2bK(
id: 'v2b-k',
description: 'Nidan verb (upper class) with ' 'bu' ' ending (archaic)'),
v2bS(
id: 'v2b-s',
description: 'Nidan verb (lower class) with ' 'bu' ' ending (archaic)'),
v2dK(
id: 'v2d-k',
description: 'Nidan verb (upper class) with ' 'dzu' ' ending (archaic)'),
v2dS(
id: 'v2d-s',
description: 'Nidan verb (lower class) with ' 'dzu' ' ending (archaic)'),
v2gK(
id: 'v2g-k',
description: 'Nidan verb (upper class) with ' 'gu' ' ending (archaic)'),
v2gS(
id: 'v2g-s',
description: 'Nidan verb (lower class) with ' 'gu' ' ending (archaic)'),
v2hK(
id: 'v2h-k',
description:
'Nidan verb (upper class) with ' 'hu/fu' ' ending (archaic)'),
v2hS(
id: 'v2h-s',
description:
'Nidan verb (lower class) with ' 'hu/fu' ' ending (archaic)'),
v2kK(
id: 'v2k-k',
description: 'Nidan verb (upper class) with ' 'ku' ' ending (archaic)'),
v2kS(
id: 'v2k-s',
description: 'Nidan verb (lower class) with ' 'ku' ' ending (archaic)'),
v2mK(
id: 'v2m-k',
description: 'Nidan verb (upper class) with ' 'mu' ' ending (archaic)'),
v2mS(
id: 'v2m-s',
description: 'Nidan verb (lower class) with ' 'mu' ' ending (archaic)'),
v2nS(
id: 'v2n-s',
description: 'Nidan verb (lower class) with ' 'nu' ' ending (archaic)'),
v2rK(
id: 'v2r-k',
description: 'Nidan verb (upper class) with ' 'ru' ' ending (archaic)'),
v2rS(
id: 'v2r-s',
description: 'Nidan verb (lower class) with ' 'ru' ' ending (archaic)'),
v2sS(
id: 'v2s-s',
description: 'Nidan verb (lower class) with ' 'su' ' ending (archaic)'),
v2tK(
id: 'v2t-k',
description: 'Nidan verb (upper class) with ' 'tsu' ' ending (archaic)'),
v2tS(
id: 'v2t-s',
description: 'Nidan verb (lower class) with ' 'tsu' ' ending (archaic)'),
v2wS(
id: 'v2w-s',
description: 'Nidan verb (lower class) with '
'u'
' ending and '
'we'
' conjugation (archaic)'),
v2yK(
id: 'v2y-k',
description: 'Nidan verb (upper class) with ' 'yu' ' ending (archaic)'),
v2yS(
id: 'v2y-s',
description: 'Nidan verb (lower class) with ' 'yu' ' ending (archaic)'),
v2zS(
id: 'v2z-s',
description: 'Nidan verb (lower class) with ' 'zu' ' ending (archaic)'),
v4b(id: 'v4b', description: 'Yodan verb with ' 'bu' ' ending (archaic)'),
v4g(id: 'v4g', description: 'Yodan verb with ' 'gu' ' ending (archaic)'),
v4h(id: 'v4h', description: 'Yodan verb with ' 'hu/fu' ' ending (archaic)'),
v4k(id: 'v4k', description: 'Yodan verb with ' 'ku' ' ending (archaic)'),
v4m(id: 'v4m', description: 'Yodan verb with ' 'mu' ' ending (archaic)'),
v4n(id: 'v4n', description: 'Yodan verb with ' 'nu' ' ending (archaic)'),
v4r(id: 'v4r', description: 'Yodan verb with ' 'ru' ' ending (archaic)'),
v4s(id: 'v4s', description: 'Yodan verb with ' 'su' ' ending (archaic)'),
v4t(id: 'v4t', description: 'Yodan verb with ' 'tsu' ' ending (archaic)'),
v5aru(id: 'v5aru', description: 'Godan verb - -aru special class'),
v5b(id: 'v5b', description: 'Godan verb with ''bu'' ending'),
v5g(id: 'v5g', description: 'Godan verb with ''gu'' ending'),
v5k(id: 'v5k', description: 'Godan verb with ''ku'' ending'),
v5b(id: 'v5b', description: 'Godan verb with ' 'bu' ' ending'),
v5g(id: 'v5g', description: 'Godan verb with ' 'gu' ' ending'),
v5k(id: 'v5k', description: 'Godan verb with ' 'ku' ' ending'),
v5kS(id: 'v5k-s', description: 'Godan verb - Iku/Yuku special class'),
v5m(id: 'v5m', description: 'Godan verb with ''mu'' ending'),
v5n(id: 'v5n', description: 'Godan verb with ''nu'' ending'),
v5r(id: 'v5r', description: 'Godan verb with ''ru'' ending'),
v5rI(id: 'v5r-i', description: 'Godan verb with ''ru'' ending (irregular verb)'),
v5s(id: 'v5s', description: 'Godan verb with ''su'' ending'),
v5t(id: 'v5t', description: 'Godan verb with ''tsu'' ending'),
v5u(id: 'v5u', description: 'Godan verb with ''u'' ending'),
v5uS(id: 'v5u-s', description: 'Godan verb with ''u'' ending (special class)'),
v5uru(id: 'v5uru', description: 'Godan verb - Uru old class verb (old form of Eru)'),
v5m(id: 'v5m', description: 'Godan verb with ' 'mu' ' ending'),
v5n(id: 'v5n', description: 'Godan verb with ' 'nu' ' ending'),
v5r(id: 'v5r', description: 'Godan verb with ' 'ru' ' ending'),
v5rI(
id: 'v5r-i',
description: 'Godan verb with ' 'ru' ' ending (irregular verb)'),
v5s(id: 'v5s', description: 'Godan verb with ' 'su' ' ending'),
v5t(id: 'v5t', description: 'Godan verb with ' 'tsu' ' ending'),
v5u(id: 'v5u', description: 'Godan verb with ' 'u' ' ending'),
v5uS(
id: 'v5u-s',
description: 'Godan verb with ' 'u' ' ending (special class)'),
v5uru(
id: 'v5uru',
description: 'Godan verb - Uru old class verb (old form of Eru)'),
vi(id: 'vi', description: 'intransitive verb'),
vk(id: 'vk', description: 'Kuru verb - special class'),
vn(id: 'vn', description: 'irregular nu verb'),
vr(id: 'vr', description: 'irregular ru verb, plain form ends with -ri'),
vs(id: 'vs', description: 'noun or participle which takes the aux. verb suru'),
vs(
id: 'vs',
description: 'noun or participle which takes the aux. verb suru'),
vsC(id: 'vs-c', description: 'suru verb - precursor to the modern suru'),
vsI(id: 'vs-i', description: 'suru verb - included'),
vsS(id: 'vs-s', description: 'suru verb - special class'),
vt(id: 'vt', description: 'transitive verb'),
vz(id: 'vz', description: 'Ichidan verb - zuru verb (alternative form of -jiru verbs)');
vz(
id: 'vz',
description:
'Ichidan verb - zuru verb (alternative form of -jiru verbs)');
final String id;
final String description;
@@ -103,8 +168,7 @@ enum JMdictPOS {
required this.description,
});
static JMdictPOS fromId(String id) =>
JMdictPOS.values.firstWhere(
static JMdictPOS fromId(String id) => JMdictPOS.values.firstWhere(
(e) => e.id == id,
orElse: () => throw Exception('Unknown id: $id'),
);