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

make callback Type FutureOr #66

Open
torbenkeller opened this issue Feb 25, 2021 · 0 comments
Open

make callback Type FutureOr #66

torbenkeller opened this issue Feb 25, 2021 · 0 comments

Comments

@torbenkeller
Copy link

The callbacks onOpen, onDismiss and onComplete are of type Future<bool>. This leads to the problem that you always have to make the callback an async function even if the callback doesn't await something. This can be easily fixed by changing the callback type to FutureOr<bool>. With this type, the function can be a Future but doesn't have to.

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

No branches or pull requests

1 participant