You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 5, 2022. It is now read-only.
In the same way we're wrapping returned Promises in promiseToFuture, so they can be directly used in Dart as Futures, I think we could also wrap callbacks passed as parameters with allowInterop so the users' code in Dart doesn't need to.
I understand the generator itself can't know if there's going to be a negative performance impact from calling allowInterop automatically, but it'd be cool if there was a flag to control this behavior on a per-usage basis.
The text was updated successfully, but these errors were encountered:
In the same way we're wrapping returned Promises in
promiseToFuture
, so they can be directly used in Dart as Futures, I think we could also wrap callbacks passed as parameters withallowInterop
so the users' code in Dart doesn't need to.On something like:
This generates:
Which in Dart you need to use as:
It'd be way more pleasing (and easier to read) to be able to just do:
I understand the generator itself can't know if there's going to be a negative performance impact from calling
allowInterop
automatically, but it'd be cool if there was a flag to control this behavior on a per-usage basis.The text was updated successfully, but these errors were encountered: