BilalShahid13 / PersistentBottomNavBar

A highly customizable persistent bottom navigation bar for Flutter
BSD 3-Clause "New" or "Revised" License
507 stars 371 forks source link

Custom back button go to index #311

Open Nedimko123 opened 1 year ago

Nedimko123 commented 1 year ago

with this: handleAndroidBackButtonPress: true, // Default is true.

it will always return to 0 index, but I want it to return to my initial index of 2 and not 0 when I press back. I could do that in the onwillpop function but it's not working, as It causes an error: _AssertionError ('package:persistent_bottom_nav_bar/persistent_tab_view.widget.dart': Failed assertion: line 49 pos 16: 'handleAndroidBackButtonPress && onWillPop == null': If you declare the onWillPop function, you will have to handle the back function functionality yourself as your onWillPop function will override the default function.)