diff --git a/android/src/main/java/com/finogeeks/mop/api/mop/AppletHandlerModule.java b/android/src/main/java/com/finogeeks/mop/api/mop/AppletHandlerModule.java index 355fea6..831e7ab 100644 --- a/android/src/main/java/com/finogeeks/mop/api/mop/AppletHandlerModule.java +++ b/android/src/main/java/com/finogeeks/mop/api/mop/AppletHandlerModule.java @@ -182,7 +182,6 @@ public class AppletHandlerModule extends BaseApi { handler.post(() -> { channel.invokeMethod("extensionApi:onCustomMenuClick", params); }); - callback.onSuccess(null); } @Override diff --git a/lib/api.dart b/lib/api.dart index 1b6b61e..f5e5f6f 100644 --- a/lib/api.dart +++ b/lib/api.dart @@ -34,6 +34,6 @@ abstract class AppletHandler { Future> getCustomMenus(String appId); ///自定义菜单点击处理 - Future onCustomMenuClick( + Future onCustomMenuClick( String appId, String path, String menuId, String appInfo); } diff --git a/lib/mop.dart b/lib/mop.dart index 82c141b..1ab0a4b 100644 --- a/lib/mop.dart +++ b/lib/mop.dart @@ -180,7 +180,7 @@ class Mop { print("registerAppletHandler getCustomMenus list $list"); return list; }; - _extensionApis["onCustomMenuClick"] = (params) { + _extensionApis["onCustomMenuClick"] = (params) async { return handler.onCustomMenuClick( params["appId"], params["path"], params["menuId"], params["appInfo"]); };