jb3rndt / PersistentBottomNavBarV2

A highly customizable persistent bottom navigation bar for Flutter
https://pub.dev/packages/persistent_bottom_nav_bar_v2
BSD 3-Clause "New" or "Revised" License
49 stars 54 forks source link

Going back between tabs on Android home screens #117

Closed ishakdas closed 10 months ago

ishakdas commented 10 months ago

My question is for android. When I press the back button after switching between tabs on the home page, the application closes. Can I go to the tab I was on before instead?

jb3rndt commented 10 months ago

Hi, yes but it depends on the version of the package you are using. Version 5 (currently in beta): Setting handleAndroidBackButtonPress: true (which is the default), every press on the android back button goes through the history of openeded tabs until it reaches the beginning. Then it will minimize the app.

Version 4: Setting handleAndroidBackButtonPress: true (which is the default) will go to the first tab on the first press and minimize the app with the second press. This version does not support going through the tab history, so to achieve that you have to upgrade to Version 5.

I hope that helps :)