-
Notifications
You must be signed in to change notification settings - Fork 58
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
Update web implementation to depend on Dart 3.3 JS interop + the recommended web
package
#26
Conversation
…mmended `web` package
For some strange reason the CI is failing to start the iOS Simulator. Doesn't seem to be anything related to the PR changes, but it worked correctly for a previous run 2 weeks ago. |
sdk: '>=3.3.0 <4.0.0' | ||
flutter: ">=3.19.0" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we guarantee that this doesn't require the latest versions of Dart and Flutter?
Just trying to not limit this based on just the newer version.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll check later, although my understanding is that it's only available from Dart version 3.3.
In fact, the pub.dev web
package has 3.3 as a constraint, and it's what the team is starting to push forward to be compatible with WASM.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, js_interop
is available only since Dart 3.3 https://medium.com/dartlang/dart-3-3-325bf2bf6c13, so there is no way to have older versions supported.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Understood.
When I get back on Monday, I think we'll have to make this a major version so that it's distinct from everything up to this point.
chewie
will also have to be bumped up due to this, since it makes use of this library.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for adding some work. Had users requesting to support WASM and agreed to do the migration in Plus Plugins
@davidmartos96 please re-sync your changes with |
@diegotori I think you can turn on this option in the repo to get a button to do such syncs yourself as well. |
I didn't know that was an option in the repo. I was confused that the option to update with master wasn't there. |
LGTM. |
Fixes #24 and #28
The following PR updates de Web code to depend on the enhanced JS interop solution Dart provided in version 3.3+
The
js
dependency anddart:html
are dropped in favor ofweb
anddart:js_interop
https://dart.dev/interop/js-interopMigration: https://dart.dev/interop/js-interop/package-web
This seems to be the approach the official plugins are starting to take for the web implementation