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 97 forks source link

How to pop a page or multiple pages programatically. #123

Closed mjmon closed 3 years ago

mjmon commented 3 years ago

How to do this below for GoRouter

pop a page

Navigator.pop();

pop series of pages until a specific named route.

Navigator.of(context)
              .popUntil(ModalRoute.withName("/Page1"));