getx
getx copied to clipboard
GetRouterOutlet replacing its ancorRoute even with participatesInRootNavigator: true
When using two nested GetRouterOutles and navigating inside the deeper one, this is replacing the topmost page.
I created a POC to exemplify the case because it has many files: https://github.com/victorths/getx_nested_router_outlets
Steps to reproduce the behavior:
- Go to HomePage
- Click on '...' menu and navigate to HomeB (it works as intended)
- Click on '..' menu and navigate to HomeA (it replaces the Home app bar)
- See error
When navigating to HomeA the Home AppBar should not desapear.
Flutter Version: 3.3.6
Getx Version: 4.6.5
Thanks for submitting this. I'm going to work on it this week
Hello. I am facing same issue... any update here?
@jonataslaw did you manage to solve it?
in version 5.0.0-release-candidate-5, i encountered the same situation, how to solve it?
@jonataslaw Looking forward to your reply
Hello all! I use Getx version 5.0.0-release-candidate-5. i had the same issue, and i think i found solution. in GetRouterOutler we need to use filterPages
GetRouterOutlet(
anchorRoute: Routes.home,
initialRoute: Routes.orders,
filterPages: (page) {
return page.takeWhile((p) => p.participatesInRootNavigator == null);
},
),