PersistentBottomNavBarV2 icon indicating copy to clipboard operation
PersistentBottomNavBarV2 copied to clipboard

It is possible to push two pages at once?

Open kawi15 opened this issue 1 year ago • 1 comments

Hi.

I am wondering if it is possible with this package to:

  1. push new page
  2. meanwhile changing tab

so, for example:

I am in tab one, I tap the button I am navigating to new page which is not one of tabs, and when I navigate to new page I want to change tab one to tab two.

I hope I explained it enough, it is possible?

kawi15 avatar Aug 13 '24 09:08 kawi15

You can do that, yes. You need the instance of the PersistentTabController as shown here (https://github.com/jb3rndt/PersistentBottomNavBarV2?tab=readme-ov-file#controlling-the-navigation-bar-programmatically). After pushing the page in the onPressed handler of your button you can use this controller to switch to another tab. Note that you must push your new page to the root navigator, otherwise it will disappear when changing the tab.

jb3rndt avatar Sep 09 '24 13:09 jb3rndt