DataDog / dd-sdk-flutter

Flutter bindings and tools for utilizing Datadog Mobile SDKs
Apache License 2.0
43 stars 42 forks source link

Migrate to package:web from dart:html #615

Closed ChanghyeonYoon closed 1 month ago

ChanghyeonYoon commented 4 months ago

Feature description

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

../../../.pub-cache/hosted/pub.dev/datadog_flutter_plugin-2.5.0/lib/datadog_flutter_pl
ugin_web.dart:12:8: Error: Dart library 'dart:html' is not available on this platform.
import 'dart:html' as html show window;

When I try build to wasm, It's not working because of dart:html. Flutter team recommend package:web instead of dart:html.

Proposed solution

No response

Other relevant information

image
fuzzybinary commented 4 months ago

I've made the initial changes for this migration, but it needs additional testing and I need to determine if this requires a major version bump (as it puts our minimum Dart version at 3.3.0 (Flutter 3.19+). We still have serval users on Dart < 3.3, so this would potentially break updates for them.

ChanghyeonYoon commented 4 months ago

@fuzzybinary Thank you for your support! After merge PR #617 to develop branch, I will check the issue in my project.

fuzzybinary commented 1 month ago

This is fixed in 2.7.0, which now has a minimum Dart target of 3.3