-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Using a browser API that returns Promise #44664
Comments
Thanks for the bug report! Indeed, there is an internal limitation that disallows us to use JS-interop on types that are already expose in dart:html (what we call "native" types). This is a tricky and brittle part of JS-interop today that we hope to improve it this year. Short term, @srujzs is about to land a change that will check and report a compile-time error if we detect this issue. We can't always detect it, but in the example you showed above we would have. |
I think I observed something similar trying to use |
@johnniwinther - I believe your issue with requestFIleSystem is due to #45036 |
Right, the symptoms seem identical to that issue. Addressing the original issue though, you can still workaround this limitation (that won't break in unexpected ways) by using |
I've trying to use
window.crypto.subtle.generateKey
and gotcrypto_subtle.dart
working ondartdevc
anddart2js
, butflutter run -d web-server --release
is broken (I couldn't reproduce the issue withdart2js -O4
).If I use
CryptoKey
fromdart:html
, I can get it working onflutter run -d web-server --release
, as well asflutter test --platform chrome
, but notdart test -p chrome
.Minimal example with comments:
https://gist.github.com/jonasfj/30d7a41b57d1af9b84edb039f1912011
Context: google/webcrypto.dart#7
The text was updated successfully, but these errors were encountered: