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

How to switch to another tab dynamically? #19

Open
iqtedar123 opened this issue Jul 30, 2021 · 2 comments
Open

How to switch to another tab dynamically? #19

iqtedar123 opened this issue Jul 30, 2021 · 2 comments

Comments

@iqtedar123
Copy link

Lets say I have three tabs:
Tab 1, 2, 3.
And I am in tab 2. How can I switch over to Tab 3?

@haithambassam
Copy link

There is a state variable in the example _currentTab, you can change this variable to the tap number you want to be selected, but remember you have to put this into setState((){ _currentTab = TabItem.values[2] })

@arbazadam
Copy link

What if i want to visit a nested route within that other tab. Say for example a Route on tab 2? From Tab 1? Also, what should be done in the case where i dont need to preserve the state of my visited tab. Issue #21 @haithambassam @bizz84

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

3 participants