diff --git a/CHANGELOG.md b/CHANGELOG.md index 41cc7d8..43c7320 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,8 @@ ## 0.0.1 +* Initial release -* TODO: Describe initial release. +## 0.0.2 +* 优化通信 + +## 0.0.3 +* 添加iOS/Android下载地址 diff --git a/lib/utils/app_bridge.dart b/lib/utils/app_bridge.dart index f842764..774ee9e 100644 --- a/lib/utils/app_bridge.dart +++ b/lib/utils/app_bridge.dart @@ -73,6 +73,7 @@ enum ToFlutterAppEnum { ); } } + //通用交互 enum WebInteractionType { taskKeyWatchLive('TaskKeyWatchLive'), // 观看直播 @@ -101,14 +102,14 @@ enum WebInteractionType { ; const WebInteractionType( - this.code, - ); + this.code, + ); final String code; //服务端 key factory WebInteractionType.fromCode(String? code) => values.firstWhere( (element) => element.code == code, - orElse: () => WebInteractionType.unknown, - ); + orElse: () => WebInteractionType.unknown, + ); } // 原生交互通知 h5 {type:'enum',data:'所需参数 '} @@ -242,10 +243,11 @@ class FlutterBridge { }); void checkGameState(String gameCode) => sendToFlutter( ToFlutterAppEnum.checkGameState.code, {'gameCode': gameCode}); + void share({ - required String activityId, - required bool needShareReport, - Map extraParams = const {}, + required String activityId, // 活动id + required bool needShareReport, // 是否需要上报分享数据 + Map extraParams = const {}, // 额外的参数 分享上方卡片 数据,参考客户端参数 }) => sendToFlutter(ToFlutterAppEnum.share.code, { "activityId": activityId,