handleMethodCall method
Handles method calls over the MethodChannel of this plugin. Note: Check the "federated" architecture for a new way of doing this: https://flutter.dev/go/federated-plugins
Implementation
Future<dynamic> handleMethodCall(MethodCall call) async {
print("call handle method call function name is :" + call.method);
switch (call.method) {
case 'initSVUI':
return _init(
SdkAccountInfo.fromJson(json.decode(call.arguments['accountInfo'])),
call.arguments['isTest']);
case 'tts':
return _tts(call.arguments["text"], call.arguments["language"]);
case 'setLogLevel':
case 'release':
case 'getPlatformVersion':
case 'oralEvaluate':
case 'stopCapture':
case 'startQA':
case 'clearAudioRecord':
case 'getAudioRecordSize':
print("unimplemented");
break;
default:
throw PlatformException(
code: 'Unimplemented',
details: 'svui插件web版不支持 \'${call.method}\'',
);
}
}