Closed Zazo032 closed 1 year ago
Hi @Zazo032
As far as I know, waiting for a route with Nav2 is not currently possible. In the provided example, using the context.go
method does not provide a future to wait for.
Unfortunately, I don't have any specific resources or methods on how to achieve this behavior. However, it would be a great feature to have, if you have any resource on how to do it, I would be happy to receive it.
In the meantime, you can consider alternative approaches to achieve similar behavior, such as using callbacks or custom event handling to trigger the desired actions after the route is complete.
@SchabanBo it's not available in the official plugin, but there's a workaround that might help here too: https://github.com/flutter/flutter/issues/108764#issuecomment-1367171796
With other navigation plugins, like
go_router
, you can do something like this:Here, the
callback()
function runs after you pop the/profile
route.However, a similar approach with
qlevar_router
doesn't seem to work:In this case, the
callback()
function runs after the new route is pushed, without waiting for a pop.Is there any way to achieve a similar behaviour with this plugin?