diff --git a/CHANGELOG.md b/CHANGELOG.md index 54a4615..49a7dd2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +# 2.7.0 + +## Breaking Changes + +* Upgraded Low-Level Native Chat SDK to 8.0. + # 2.6.0 ## Breaking Changes diff --git a/example/pubspec.lock b/example/pubspec.lock index ab12488..59a8552 100644 --- a/example/pubspec.lock +++ b/example/pubspec.lock @@ -1241,33 +1241,33 @@ packages: dependency: transitive description: name: tencent_cloud_chat_sdk - sha256: "358e79b51aba5457418d3bb87e0bbd0f088a1eaf4c4463d09bdda93d1d655aa3" + sha256: ec9d338fe3aa82b71cd9c46b0ebe54267ae6a79f03d1b4b4c506b121fe64bd5b url: "https://pub.dev" source: hosted - version: "7.9.5672" + version: "8.0.5897" tencent_cloud_chat_uikit: dependency: "direct main" description: path: ".." relative: true source: path - version: "2.6.0+1" + version: "2.7.0" tencent_cloud_uikit_core: dependency: transitive description: name: tencent_cloud_uikit_core - sha256: "61a5400b3fe75c00252272469f332e7ec07f6d1932ee636a3f2b919cf9805cb8" + sha256: "987e266dec10801510ada00411ddb063de8129bf550d2d25ba32d88afa272a67" url: "https://pub.dev" source: hosted - version: "1.6.0" + version: "1.7.0" tencent_im_base: dependency: transitive description: name: tencent_im_base - sha256: daee1faac70fdf5fa4a53576db4fb7268ba5d897cc036353d3114a31abb76fb1 + sha256: "08790ad86bc780f071975d62aadf1d9b853a7a84d5e2dfb37fceb6977856fbdc" url: "https://pub.dev" source: hosted - version: "3.3.775297" + version: "8.0.0" tencent_im_sdk_plugin_desktop: dependency: "direct main" description: @@ -1328,10 +1328,10 @@ packages: dependency: transitive description: name: tim_ui_kit_sticker_plugin - sha256: "1c4164afbe0bd6479faeee70fad328e82666f8b75c8d54382e97fed250452611" + sha256: "723152d3c67636c25b3d14eaca2f81a5e2b75b85603a62ddbe0480db0a9d6488" url: "https://pub.dev" source: hosted - version: "3.1.0" + version: "3.2.0" transparent_image: dependency: transitive description: diff --git a/lib/ui/views/TIMUIKitChat/TIMUIKitTextField/tim_uikit_text_field_layout/wide.dart b/lib/ui/views/TIMUIKitChat/TIMUIKitTextField/tim_uikit_text_field_layout/wide.dart index 38a3331..85c6e31 100644 --- a/lib/ui/views/TIMUIKitChat/TIMUIKitTextField/tim_uikit_text_field_layout/wide.dart +++ b/lib/ui/views/TIMUIKitChat/TIMUIKitTextField/tim_uikit_text_field_layout/wide.dart @@ -1,7 +1,6 @@ import 'dart:async'; import 'dart:io'; import 'dart:math'; - // ignore: unnecessary_import import 'dart:typed_data'; @@ -48,7 +47,15 @@ class DesktopControlBarItem { final String? showName; final double? size; - DesktopControlBarItem({required this.item, this.icon, this.color, this.imgPath, this.svgPath, required this.onClick, this.showName, this.size}) + DesktopControlBarItem( + {required this.item, + this.icon, + this.color, + this.imgPath, + this.svgPath, + required this.onClick, + this.showName, + this.size}) : assert(icon != null || TencentUtils.checkString(imgPath) != null || TencentUtils.checkString(svgPath) != null); } @@ -261,8 +268,11 @@ class _TIMUIKitTextFieldLayoutWideState extends TIMUIKitState= 104857600) { - onTIMCallback(TIMCallback(type: TIMCallbackType.INFO, infoRecommendText: TIM_t("发送失败,视频不能大于100MB"), infoCode: 6660405)); + onTIMCallback( + TIMCallback(type: TIMCallbackType.INFO, infoRecommendText: TIM_t("发送失败,视频不能大于100MB"), infoCode: 6660405)); return; } @@ -602,7 +626,10 @@ class _TIMUIKitTextFieldLayoutWideState extends TIMUIKitState Container( - padding: const EdgeInsets.all(16), - child: Column( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - SizedBox( - height: min(360, size.height / 2), - child: InkWell( - onTap: () { - launchUrl(PlatformUtils().isWeb ? Uri.parse(filePath) : Uri.file(filePath)); - }, - child: PlatformUtils().isWeb - ? Image.network( - filePath, - height: min(360, size.height / 2), - ) - : Image.file( - File(filePath), - height: min(360, size.height / 2), - ), - ), - ), - Row( - mainAxisAlignment: MainAxisAlignment.end, - mainAxisSize: MainAxisSize.max, - children: [ - OutlinedButton( - onPressed: () { - closeFunc(); - }, - child: Text(TIM_t("取消"))), - const SizedBox( - width: 20, + operationKey: TUIKitWideModalOperationKey.beforeSendScreenShot, + context: context, + isDarkBackground: false, + width: 500, + height: min(500, size.height / 2 + 140), + title: TIM_t_para("发送给{{option1}}", "发送给$option1")(option1: option1), + child: (closeFunc) => Container( + padding: const EdgeInsets.all(16), + child: Column( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + SizedBox( + height: min(360, size.height / 2), + child: InkWell( + onTap: () { + launchUrl(PlatformUtils().isWeb ? Uri.parse(filePath) : Uri.file(filePath)); + }, + child: PlatformUtils().isWeb + ? Image.network( + filePath, + height: min(360, size.height / 2), + ) + : Image.file( + File(filePath), + height: min(360, size.height / 2), ), - ElevatedButton( - onPressed: () { - MessageUtils.handleMessageError( - widget.model.sendImageMessage(imagePath: filePath, imageName: fileName, convID: widget.conversationID, convType: widget.conversationType), context); - closeFunc(); - }, - child: Text(TIM_t("发送"))) - ], - ) - ], ), - )); + ), + Row( + mainAxisAlignment: MainAxisAlignment.end, + mainAxisSize: MainAxisSize.max, + children: [ + OutlinedButton( + onPressed: () { + closeFunc(); + }, + child: Text(TIM_t("取消"))), + const SizedBox( + width: 20, + ), + ElevatedButton( + onPressed: () { + MessageUtils.handleMessageError( + widget.model.sendImageMessage( + imagePath: filePath, + imageName: fileName, + convID: widget.conversationID, + convType: widget.conversationType), + context); + closeFunc(); + }, + child: Text(TIM_t("发送"))) + ], + ) + ], + ), + ), + ); } _sendScreenShot() async { @@ -798,7 +838,10 @@ class _TIMUIKitTextFieldLayoutWideState extends TIMUIKitState TIMUIKitSearchMsgDetail( currentConversation: widget.currentConversation, keyword: '', - initMessageList: widget.model.getOriginMessageList().getRange(0, min(widget.model.getOriginMessageList().length, 100)).toList(), + initMessageList: widget.model + .getOriginMessageList() + .getRange(0, min(widget.model.getOriginMessageList().length, 100)) + .toList(), onTapConversation: (V2TimConversation conversation, V2TimMessage? message) {}, ), theme: widget.theme); @@ -809,7 +852,10 @@ class _TIMUIKitTextFieldLayoutWideState extends TIMUIKitState generateControlBar(TUIChatSeparateViewModel model, TUITheme theme) { - final List itemsList = [...defaultControlBarItems, ...(widget.chatConfig.additionalDesktopControlBarItems ?? [])]; + final List itemsList = [ + ...defaultControlBarItems, + ...(widget.chatConfig.additionalDesktopControlBarItems ?? []) + ]; return generateBarIcons(itemsList, theme); } @@ -934,7 +980,9 @@ class _TIMUIKitTextFieldLayoutWideState extends TIMUIKitState