csells / go_router

The purpose of the go_router for Flutter is to use declarative routes to reduce complexity, regardless of the platform you're targeting (mobile, web, desktop), handling deep linking from Android, iOS and the web while still allowing an easy-to-use developer experience.
https://gorouter.dev
441 stars 96 forks source link

Way for pushReplacement #291

Closed idamsel closed 2 years ago

idamsel commented 2 years ago

Kindly let me know that how to implement pushReplacement with this package as readme not provide proper explanation for all way of routing. (push , pop , pushReplacement)

csells commented 2 years ago

Each call to context.go() replaces the entire stack of pages. Just define a route with the pages you want and navigate to that.