dlutton / flutter_tts

Flutter Text to Speech package
MIT License
599 stars 249 forks source link

Migrate to package:web to support WASM #480

Open IchordeDionysos opened 5 months ago

IchordeDionysos commented 5 months ago

πŸš€ 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)

Vanessa-Berazategui commented 3 months ago

Hi, I was looking for this topic.

allComputableThings commented 3 months ago

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;
^
hasanm08 commented 1 month ago

I need this too @dlutton