bizz84 / nested-navigation-demo-flutter

Nested navigation with BottomNavigationBar
https://codewithandrea.com/
MIT License
616 stars 139 forks source link

Skip maintaining the state on each tab screen. #21

Open arbazadam opened 2 years ago

arbazadam commented 2 years ago

I would like to know that how can i skip maintaining the state of the visited tab screen. What i mean is if i am on the first tab and i visit a nested route within that tab and then switch to the second tab. Now coming back to the first tab should always take me to the initial screen rather then the nested screen. How do i do that?

SEGVeenstra commented 2 years ago

If I understand correctly, you DON'T want to maintain state of the tabs?

Did you use this project as your base? Because this specifically addresses that problem (from the README).

If you don't want to maintain state, You can probably do with a single nested Navigator and use the BottomNavigationBar to switch between routes.