Skip to content

Upgrade JS interop by removing dart:html dependency #78

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

Closed
maxlapides opened this issue May 15, 2024 · 4 comments
Closed

Upgrade JS interop by removing dart:html dependency #78

maxlapides opened this issue May 15, 2024 · 4 comments

Comments

@maxlapides
Copy link

"The Dart team recently overhauled the collection of features and APIs that allow developers access to JavaScript and browser bindings in their Dart code. This next generation of web interop not only improves user experience, but also enables Wasm support, aligning Dart with the future of the Web."

https://dart.dev/interop/js-interop

@maxlapides
Copy link
Author

Looks like there are only two files using dart:html:

import 'dart:html' as html show window;

@edsonjab
Copy link
Contributor

edsonjab commented Jun 5, 2024

Hi @maxlapides sorry to answer late, what version of flutter are you using?

When I try run flutter pub get on the project show me this message:
image

I'm using Flutter 3.16.9

@jardianoalmeida
Copy link

boa tarde, remova esse importe e deve resolver o seu problema:

  • import 'package:segment_analytics/analytics_web.dart';

@maxlapides
Copy link
Author

@edsonjab So sorry, I just saw your note! I tested this on Flutter 3.22.

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

4 participants