handleChannelMethodCall method
Implementation
Future<dynamic> handleChannelMethodCall(MethodCall call) async {
var args = <String, dynamic>{};
if (call.arguments != null) {
args = Map<String, dynamic>.from(call.arguments);
}
if (call.method == 'callApi') {
int apiType = args['apiType'];
String param = args['params'];
return promiseToFuture(_engineMain.channel.callApi(apiType, param));
} else {
throw PlatformException(code: ErrorCode.NotSupported.toString());
}
}