flutter_tts icon indicating copy to clipboard operation
flutter_tts copied to clipboard

fix(android): when TextToSpeech initialization fails, the dart side method will always be in a pending state .

Open sososdk opened this issue 7 months ago • 0 comments

  • Use ttsStatus instead of isTtsInitialized. When TextToSpeech initialization is completed, assign the result to ttsStatus. Even if TextToSpeech initialization fails, we can call getEngines to get the engine list to set a new engine.
  • Remove setInitHandler and use await setEngine instead. On the Android side, we will call engineResult on the initialization callback.

sososdk avatar Nov 30 '23 08:11 sososdk