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

How to get result after pop #263

Closed ebelevics closed 2 years ago

ebelevics commented 2 years ago

I started to migrate Navigator 1.0 to this package, but I stumbled with this issue. In 1.0 you get Future<T?> after pushed screen is poped with onPressed: () async {final results = await Navigator.pushNamed(. How do you achieve this with GoRouter?

Future<T?> pushNamed<T extends Object?>(
  BuildContext context,
  String routeName, {
  Object? arguments,
})