setX5SdkListener static method
设置内核下载安装事件
Implementation
static Future<void> setX5SdkListener(X5SdkListener listener) async {
_channel.setMethodCallHandler((call) async {
switch (call.method) {
case "onInstallFinish":
listener.onInstallFinish(call.arguments);
break;
case "onDownloadFinish":
listener.onDownloadFinish(call.arguments);
break;
case "onDownloadProgress":
listener.onDownloadProgress(call.arguments);
break;
default:
throw MissingPluginException(
'${call.method} was invoked but has no handler');
}
});
}