fix backbutton
This commit is contained in:
parent
bd87af4a38
commit
c1a494fd9a
|
@ -15,8 +15,12 @@ class KanjiView extends StatelessWidget {
|
||||||
else if (state is KanjiSearchLoading)
|
else if (state is KanjiSearchLoading)
|
||||||
return LoadingScreen();
|
return LoadingScreen();
|
||||||
else if (state is KanjiSearchFinished)
|
else if (state is KanjiSearchFinished)
|
||||||
return KanjiResultCard(state.kanji);
|
return WillPopScope(
|
||||||
|
child: KanjiResultCard(state.kanji),
|
||||||
|
onWillPop: () async {
|
||||||
|
BlocProvider.of<KanjiBloc>(context).add(ReturnToInitialState());
|
||||||
|
return false;
|
||||||
|
});
|
||||||
throw 'No such event found';
|
throw 'No such event found';
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in New Issue