Unhandled Exception: MissingPluginException(No implementation found for method setEngine on channel flutter_tts)
Opened this issue ยท 3 comments
๐ Bug Report
I just run the example project on my iPhone
[ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: MissingPluginException(No implementation found for method setEngine on channel flutter_tts)
#0 MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:332:7)
#1 FlutterTts.setEngine (package:flutter_tts/flutter_tts.dart:454:5)
#2 TTSModule.changedEnginesDropDownItem (package:tts/tts.dart:333:5)
Version: flutter 3.19.6
Platform:
- ๐ฑ iOS 17.4.1
- ๐ค Android
There is no engine selection in IOS, that's why you have this exception, it is kind of expected.
same issue here, what is solution for iOS then?
same issue here, what is solution for iOS then?
As I said above, you need to check if you are on iOS and to not call this method.
Such as:
import 'dart:io'
...
if (Platform.isAndroid)
{
// Android-specific code, such as using setEngine
}
else if (Platform.isIOS) {
// iOS-specific code
}