mixpanel / mixpanel-flutter

Official Flutter Tracking Library for Mixpanel Analytics
https://mixpanel.com
Apache License 2.0
68 stars 75 forks source link

WASM support #133

Open walidlahba opened 9 months ago

walidlahba commented 9 months ago

Hey,

The current version of plugin is not compatible with WASM compilation

../../.pub-cache/hosted/pub.dev/mixpanel_flutter-2.2.0/lib/mixpanel_flutter_web.dart:6:1: Error: JS interop library 'package:js/js_util.dart' can't be imported when compiling to Wasm.
Try using 'dart:js_interop' or 'dart:js_interop_unsafe' instead.
import 'package:js/js_util.dart' as js;

Thank you

The-RootCause commented 9 months ago

Any updates on the this improvement ?

The-RootCause commented 8 months ago

@zihejia @jaredmixpanel Any plans to incorportate this instead of the update to js 0.7. Thank you ? This migration to js_interop is needed to make the app wasm compatible, which we rely on. right now we are using the api to send track to MP, but it's far from what the plugin is providing as coverage. Thank you

The-RootCause commented 8 months ago

@zihejia @jaredmixpanel Any updates or plans on this matter ? Thank you

vsochinsky commented 3 months ago

WASM support is in stable for flutter web, and android users will benefit greatly right away. iOS/Safari has finished developing support for GC as well and will ship it soon to support flutter wasm. Mixpanel should really release this update soon - it has been more than half a year since this issue was opened.

pedromassango commented 1 month ago

I just opened a PR that would fix this issue, see https://github.com/mixpanel/mixpanel-flutter/pull/167