SchabanBo / qlevar_router

Manage you project Routes. Create nested routes. Simply navigation without context to your pages. Change only one sub widget in your page when navigating to new route.
MIT License
87 stars 22 forks source link

How to return result/data back to the previous page? #77

Closed tejHackerDEV closed 2 years ago

tejHackerDEV commented 2 years ago

Hi @SchabanBo I didn't find any example on how to send the result back to the previous page.

Eg:- https://docs.flutter.dev/cookbook/navigation/returning-data

I found there is issue logged already in the repo but it doesn't have any answers & marked as close, so reopening it again. So please check on this as this is a common use-case for most of the people

SchabanBo commented 2 years ago

Hi @tejHackerDEV Unfortunately that is not supported in Navigator 2 because it just updates the page stack with waiting for the page to be closed, I will try to figure a way to achieve this. But not sure if it will work.

tejHackerDEV commented 2 years ago

I don't know that it is not supported by Navigator 2 but it would be great if we make any work around for that.

SchabanBo commented 2 years ago

You can see the example to do so here