diff --git a/lib/bloc/kanji/kanji_bloc.dart b/lib/bloc/kanji/kanji_bloc.dart index b9033bf..845251e 100644 --- a/lib/bloc/kanji/kanji_bloc.dart +++ b/lib/bloc/kanji/kanji_bloc.dart @@ -23,7 +23,7 @@ class KanjiBloc extends Bloc { try { final _kanji = await fetchKanji(event.kanjiSearchString); - yield KanjiSearchFinished(_kanji); + yield KanjiSearchFinished(kanji: _kanji); } on Exception { yield KanjiSearchError('Something went wrong'); } diff --git a/lib/bloc/kanji/kanji_state.dart b/lib/bloc/kanji/kanji_state.dart index bd9917e..7e5aff2 100644 --- a/lib/bloc/kanji/kanji_state.dart +++ b/lib/bloc/kanji/kanji_state.dart @@ -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 {