Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

It is possible to push two pages at once? #177

Open
kawi15 opened this issue Aug 13, 2024 · 1 comment
Open

It is possible to push two pages at once? #177

kawi15 opened this issue Aug 13, 2024 · 1 comment

Comments

@kawi15
Copy link

kawi15 commented Aug 13, 2024

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?

@jb3rndt
Copy link
Owner

jb3rndt commented Sep 9, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants