beamer
beamer copied to clipboard
Is there a way to pop all routes and push one route?
With the default Navigator, we can do Navigator.of(context).pushAndRemoveUntil(newPage, (route) => false);
which will push the newPage
widget and pop all the rest essentially resetting the stack. Is there a way to do this using Beamer?
Thank you.
Hey @pavittarsingh315 :wave: Sorry for a late response :disappointed:
"Navigator 2.0" and this Beamer works by rebuilding the entire navigation stack every time you navigate so it should be possible. This may require you to use define your custom BeamLocation
s where you explicitly define how you would like your stack to look for each navigation event that happens.
It is a bit broad question so that's all I can say for now - it is possible, but the logic behind it is quite different than the old Navigator API.