Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

async methods in callbacks #186

Closed
mbartn opened this issue Sep 10, 2018 · 1 comment
Closed

async methods in callbacks #186

mbartn opened this issue Sep 10, 2018 · 1 comment
Labels

Comments

@mbartn
Copy link

mbartn commented Sep 10, 2018

Is it possible to invoke async method in callback, e.g

webview.onUrlChanged.listen((url) async{
await Future.delayed(Duration(seconds: 5));
print('Done'!);
})

Now it doesn't wait for the method to finish.

@alsocalledchris
Copy link

You can do this with no issues - I have got it working with the onUrlChange checking for some values returned in a url and reacting to those which involves an calling an async command which is executed successfully.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants