Using go_router :
GoRouter.of(context).location
gives us the current route path such as /product/10110
but I’d like to know how to also get the current route queryParams in a similar fashion
(outside of the GoRoute builder)
Using go_router :
GoRouter.of(context).location
gives us the current route path such as /product/10110
but I’d like to know how to also get the current route queryParams in a similar fashion
(outside of the GoRoute builder)
2
Answers
go_router
has it’sqweryParams
in its state.Hence pass the
state
to the pageRouter
Usage
Accesing in the page
You can now have this functionality.
This way you can directly access the query params you send using go_router, like: