mirror of
https://github.com/h7x4/Jisho-Study-Tool.git
synced 2024-12-21 13:37:29 +01:00
fix backbutton
This commit is contained in:
parent
bd87af4a38
commit
c1a494fd9a
@ -15,8 +15,12 @@ class KanjiView extends StatelessWidget {
|
||||
else if (state is KanjiSearchLoading)
|
||||
return LoadingScreen();
|
||||
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';
|
||||
},
|
||||
);
|
||||
|
Loading…
Reference in New Issue
Block a user