tapping android back when in main exchange view takes you to wallets overview

This commit is contained in:
julian 2022-09-09 08:11:59 -06:00
parent a67f6f97e9
commit bc669489a4

View file

@ -44,6 +44,13 @@ class _HomeViewState extends ConsumerState<HomeView> {
final _cnLoadingService = ChangeNowLoadingService();
Future<bool> _onWillPop() async {
// go to home view when tapping back on the main exchange view
if (ref.read(homeViewPageIndexStateProvider.state).state == 1) {
ref.read(homeViewPageIndexStateProvider.state).state = 0;
return false;
}
if (_exitEnabled) {
return true;
}