flutter_tts icon indicating copy to clipboard operation
flutter_tts copied to clipboard

Migrate to package:web to support WASM

Open IchordeDionysos opened this issue 1 year ago • 4 comments

🚀 Feature Requests

Flutter TTS web should support WASM on web.

Contextualize the feature

WASM could help speed up Flutter web packages.

Describe the feature

The short version:

Migrate usage of dart:html to package:web Migrate usage of dart:js, dart:js_util, and package:js to dart:js_interop This will allow compiling to WASM engine instead of just JavaScript on web.

Full migration guide: https://dart.dev/interop/js-interop/package-web

Platforms affected (mark all that apply)

  • [ ] :iphone: iOS
  • [ ] :robot: Android
  • [x] 🕸️ Web

IchordeDionysos avatar Apr 01 '24 18:04 IchordeDionysos

Hi, I was looking for this topic.

Vanessa-Berazategui avatar Jun 07 '24 16:06 Vanessa-Berazategui

Currently,

produces this:

../../../.pub-cache/hosted/pub.dev/flutter_tts-3.8.5/lib/flutter_tts_web.dart:3:1: Error: JS interop library 'dart:js' can't be imported when compiling to Wasm.
Try using 'dart:js_interop' or 'dart:js_interop_unsafe' instead.
import 'dart:js' as js;
^

allComputableThings avatar Jun 16 '24 04:06 allComputableThings

I need this too @dlutton

hasanm08 avatar Jul 20 '24 19:07 hasanm08