Added starred to kanji state
This commit is contained in:
parent
c1a494fd9a
commit
920ad17e4c
|
@ -23,7 +23,7 @@ class KanjiBloc extends Bloc<KanjiEvent, KanjiState> {
|
|||
|
||||
try {
|
||||
final _kanji = await fetchKanji(event.kanjiSearchString);
|
||||
yield KanjiSearchFinished(_kanji);
|
||||
yield KanjiSearchFinished(kanji: _kanji);
|
||||
} on Exception {
|
||||
yield KanjiSearchError('Something went wrong');
|
||||
}
|
||||
|
|
|
@ -14,8 +14,12 @@ class KanjiSearchLoading extends KanjiState {
|
|||
|
||||
class KanjiSearchFinished extends KanjiState {
|
||||
final KanjiResult kanji;
|
||||
final bool starred;
|
||||
|
||||
KanjiSearchFinished(this.kanji);
|
||||
KanjiSearchFinished({
|
||||
this.kanji,
|
||||
this.starred = false,
|
||||
});
|
||||
}
|
||||
|
||||
class KanjiSearchError extends KanjiState {
|
||||
|
|
Loading…
Reference in New Issue