I'm running into an issue using GoRouter where I'm trying to navigate the bottom navbar tabs programmatically if coming from a page that is outside the stateful shell route.
For example if you observe this route hierarchy:
GoRouter
├─ GoRoute('/about')
└─ StatefulShellRoute
├─ StatefulShellBranch
│ └─ GoRoute('/a')
└─ StatefulShellBranch
└─ GoRoute('/b')
The navigation flow is you go from B Tab -> About Page -> A Tab, but when you pop from the About Page it shows the B Tab and when you use context.go(A Tab), the A Tab resets its current navigation stack.
So how would you navigate to the A Tab while also preserving its current state and navigation stack?
I think your issue is related to BottomNavigationBar and the state for each tab. Did you use
IndexedStackin the body? here is an exempleWith IndexedStack, when you will tap on a tab, _currentIndex will be updated and IndexedStack knows which widget is at the top of the stack and saves the state of the previous one. So navigation between screens should be saved per tabs