FlutterTtsPlugin constructor
FlutterTtsPlugin()
Implementation
FlutterTtsPlugin() {
try {
utterance = new js.JsObject(
js.context["SpeechSynthesisUtterance"] as js.JsFunction, [""]);
synth = new js.JsObject.fromBrowserObject(
js.context["speechSynthesis"] as js.JsObject);
_listeners();
supported = true;
} catch (e) {
print('Initialization of TTS failed. Functions are disabled. Error: $e');
}
}