【2025年1月2日】关于腾讯云小程序平台更名为腾讯云超级应用服务的公告
控制台更新动态
Android SDK 更新动态
iOS SDK 更新动态
Flutter 更新动态
IDE 更新动态
基础库更新动态
Future<bool> reportEvent(int eventId, String eventName, AppInfo appInfo,Map<Object?, Object?> params) async {return false;}
@overrideFuture<bool> reportEvent(int eventId, String eventName, AppInfo appInfo,Map<Object?, Object?> params) async {print("reportEvent:$eventName appinfo:$appInfo params:$params");// TODO: implement reportEventreturn true;}
/// Register SDK for message callback event monitoring, which can be marked/// based on EventConfig annotation to indicate whether to intercept events,/// such as log events, etcvoid registerMessageEventHandler(TcmppFlutterEventChannel handler)
_tcmppFlutterPlugin.registerMessageEventHandler(TcmppFlutterEventChannelImpl());
@EventConfig(value: true)@overrideFuture<void> uploadUserLog(String appId, String logPath) async {print("SupperAppCustom uploadUserLog:${logPath}");}
...dev_dependencies:build_runner: ^2.4.6flutter:assets:- lib/generated/tcmpp_event_config.json
flutter pub run build_runner build --delete-conflicting-outputs
{"isUpdateBaseLib": true,"uploadUserLog": true,"reportRealTimeLog": false}
/*** 实时日志回调* @param RealTimeLogInfo 日志信息*/Future<void> reportRealTimeLog(RealTimeLogInfo? logInfo) async {}
class RealTimeLogInfo {/// 当前页面String page;/// 基础库版本String jsLibVersion;/// 小程序IdString appId;/// 过滤关键字List<String> filterMsgs;/// 日志内容List<LogItem> logs;}class LogItem {/// 日志时间int time;/// 日志等级int level;/// 日志信息String msg;/// 日志TAG标记String tag;/// 日志关键字String key;}
@EventConfig(value: true)@overrideFuture<void> reportRealTimeLog(RealTimeLogInfo? logInfo) async {print("SupperAppCustom reportRealTimeLog:${logInfo}");}
Future<void> uploadUserLog(String appId, String logPath) async {}
@EventConfig(value: true)@overrideFuture<void> uploadUserLog(String appId, String logPath) async {print("SupperAppCustom uploadUserLog:${logPath}");}
Future<void> isUpdateBaseLib(Map<dynamic, dynamic>? data) async {}
@EventConfig(value: true)@overrideFuture<void> isUpdateBaseLib(Map<dynamic, dynamic>? data) async {print("isUpdateBaseLib:${data}");}
文档反馈