nested-navigation-demo-flutter icon indicating copy to clipboard operation
nested-navigation-demo-flutter copied to clipboard

How to switch to another tab dynamically?

Open iqtedar123 opened this issue 4 years ago • 2 comments

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

iqtedar123 avatar Jul 30 '21 04:07 iqtedar123

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] })

haithambassam avatar Mar 05 '22 09:03 haithambassam

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

arbazadam avatar Apr 07 '22 15:04 arbazadam