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

Update web implementation to depend on Dart 3.3 JS interop + the recommended web package #26

Merged
merged 2 commits into from
Mar 26, 2024

Conversation

davidmartos96
Copy link
Contributor

@davidmartos96 davidmartos96 commented Feb 29, 2024

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 and dart:html are dropped in favor of web and dart:js_interop https://dart.dev/interop/js-interop
Migration: 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

@davidmartos96
Copy link
Contributor Author

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.

Comment on lines +9 to +10
sdk: '>=3.3.0 <4.0.0'
flutter: ">=3.19.0"
Copy link
Collaborator

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.

Copy link
Contributor Author

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.

Copy link
Contributor

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.

Copy link
Collaborator

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.

Copy link
Contributor

@vbuberen vbuberen Mar 21, 2024

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

@diegotori
Copy link
Collaborator

@davidmartos96 please re-sync your changes with main's latest ones. Thanks.

@vbuberen
Copy link
Contributor

vbuberen commented Mar 25, 2024

@diegotori I think you can turn on this option in the repo to get a button to do such syncs yourself as well.
Check General section of repository settings and find options Always suggest updating pull request branches:
Screenshot 2024-03-25 at 23 57 47

@davidmartos96
Copy link
Contributor Author

@diegotori I think you can turn on this option in the repo to get a button to do such syncs yourself as well.
Check General section of repository settings and find options Always suggest updating pull request branches:
Screenshot 2024-03-25 at 23 57 47

I didn't know that was an option in the repo. I was confused that the option to update with master wasn't there.

@diegotori
Copy link
Collaborator

LGTM.

@diegotori diegotori merged commit 95d033a into fluttercommunity:main Mar 26, 2024
14 checks passed
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

Successfully merging this pull request may close these issues.

Use deps resolution for js like >=0.6.3 <0.8.0
3 participants