-
How to do this below for GoRouter pop a page
pop series of pages until a specific named route.
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 4 replies
-
You can use |
Beta Was this translation helpful? Give feedback.
-
No. Instead, context.go and goNamed will replace the entire stack of pages with whatever set is produced by the PageA route. Check out the docs on sub-routes for the details. |
Beta Was this translation helpful? Give feedback.
You can use
Navigator.pop()
as usual when using go_router. However, instead of usingpopUntil()
I recommend just usingcontext.go()
orcontext.goNamed()
, which will build the stack of pages for you with the location/name you specify.