class MyPlatformHandler extends TcmppPlatformEventHandler {
@override
Future<List<CustomMenu>> getCustomMenus() async {
CustomMenu menu1 = CustomMenu(
'100', 'res/images/mini_app_wechat_friend.png', 'Share To', true,
shareKey: 'twitter');
CustomMenu menu2 = CustomMenu(
'101',
'https://staticintl.cloudcachetci.com/cms/backend-cms/8WGP653_%E5%BC%80%E5%8F%91%E8%80%85%E5%B7%A5%E5%85%B7%E9%80%9A%E7%94%A8.png',
'Custom',
false);
return [
menu1,
menu2,
];
}
@override
Future<void> customMenuClick(String menuId, ShareData? shareMenu) async {
print("click menuId:$menuId shareMenu:$shareMenu");
throw UnimplementedError();
}
@override
Future<bool> reportEvent(int eventId, String eventName, AppInfo appInfo,
Map<Object?, Object?> params) async {
print("reportEvent:$eventName appinfo:$appInfo params:$params");
return true;
}
@override
Future<void> onMiniProgramStateChange(
String appId, MiniProgramState state) async {
print("app state change: appid=$appId, state=$state");
}
}
本页内容是否解决了您的问题?