update flutter uikit to 1.5.0+1

This commit is contained in:
anonymous 2023-02-06 16:25:13 +08:00
parent 78bea5cef9
commit 7f3360ead1
8 changed files with 98 additions and 130 deletions

View File

@ -1,4 +1,8 @@
## 1.5.0+1
* Fix: Video message oversize.
## 1.5.0 ## 1.5.0
* Add: New configuration `defaultAvatarAssetPath` on global `TIMUIKitConfig`, aiming to define the default avatar. * Add: New configuration `defaultAvatarAssetPath` on global `TIMUIKitConfig`, aiming to define the default avatar.

View File

@ -379,14 +379,6 @@ packages:
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "0.0.15" version: "0.0.15"
flutter_screenutil:
dependency: transitive
description:
name: flutter_screenutil
sha256: "8e049ecdc1a62c90e6bf0e9c8398ace8dde81b92889c70cfe06281d79d59113a"
url: "https://pub.dev"
source: hosted
version: "5.6.1"
flutter_slidable_for_tencent_im: flutter_slidable_for_tencent_im:
dependency: transitive dependency: transitive
description: description:
@ -1088,7 +1080,7 @@ packages:
path: ".." path: ".."
relative: true relative: true
source: path source: path
version: "1.4.0" version: "1.5.0+1"
tencent_extended_text: tencent_extended_text:
dependency: transitive dependency: transitive
description: description:
@ -1117,10 +1109,10 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: tencent_im_base name: tencent_im_base
sha256: "2c8fd0f47d6b22d234f24042c5ac66febe6d71b7c9e131c95031e931efe9aa7b" sha256: bbd2d70c82b018ce86c421f0b4eb02f650456d0bbd7ea5558110139c7b04c4b4
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "1.0.20" version: "1.0.21"
tencent_im_sdk_plugin_platform_interface: tencent_im_sdk_plugin_platform_interface:
dependency: transitive dependency: transitive
description: description:

View File

@ -354,7 +354,7 @@ class _TIMUIKitHistoryMessageListState
} }
return Container( return Container(
color: theme.chatBgColor, color: theme.chatBgColor ,
child: Stack( child: Stack(
alignment: Alignment.topCenter, alignment: Alignment.topCenter,
children: [ children: [

View File

@ -13,7 +13,6 @@ import 'dart:typed_data';
import 'package:cached_network_image/cached_network_image.dart'; import 'package:cached_network_image/cached_network_image.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:loading_animation_widget/loading_animation_widget.dart'; import 'package:loading_animation_widget/loading_animation_widget.dart';
import 'package:path_provider/path_provider.dart'; import 'package:path_provider/path_provider.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
@ -230,15 +229,6 @@ class _TIMUIKitImageElem extends TIMUIKitState<TIMUIKitImageElem> {
return; return;
} }
getImgWidthAndHeight(
BoxConstraints constraints, double height, double width) {
//
double hwrate = height / width;
double curWidth = min(width, constraints.maxWidth * 0.5);
double curHeight = curWidth * hwrate;
return {height: curHeight, width: curWidth};
}
Future<void> _saveImg(TUITheme theme) async { Future<void> _saveImg(TUITheme theme) async {
String? path = widget.message.imageElem!.path; String? path = widget.message.imageElem!.path;
if (path != null && PlatformUtils().isWeb if (path != null && PlatformUtils().isWeb

View File

@ -99,11 +99,13 @@ class _TIMUIKitSoundElemState extends TIMUIKitState<TIMUIKitSoundElem> {
widget.message.soundElem!.url == '') { widget.message.soundElem!.url == '') {
final response = await _messageService.getMessageOnlineUrl( final response = await _messageService.getMessageOnlineUrl(
msgID: widget.message.msgID!); msgID: widget.message.msgID!);
if(response.data != null){
widget.message.soundElem = response.data!.soundElem; widget.message.soundElem = response.data!.soundElem;
Future.delayed(const Duration(microseconds: 10), () { Future.delayed(const Duration(microseconds: 10), () {
setState(() => stateElement = response.data!.soundElem!); setState(() => stateElement = response.data!.soundElem!);
}); });
} }
}
if (!PlatformUtils().isWeb) { if (!PlatformUtils().isWeb) {
if (widget.message.soundElem!.localUrl == null || if (widget.message.soundElem!.localUrl == null ||
widget.message.soundElem!.localUrl == '') { widget.message.soundElem!.localUrl == '') {

View File

@ -3,7 +3,6 @@ import 'dart:math';
import 'package:flutter/foundation.dart'; import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:loading_animation_widget/loading_animation_widget.dart'; import 'package:loading_animation_widget/loading_animation_widget.dart';
import 'package:tencent_cloud_chat_uikit/base_widgets/tim_ui_kit_base.dart'; import 'package:tencent_cloud_chat_uikit/base_widgets/tim_ui_kit_base.dart';
import 'package:tencent_cloud_chat_uikit/base_widgets/tim_ui_kit_state.dart'; import 'package:tencent_cloud_chat_uikit/base_widgets/tim_ui_kit_state.dart';
@ -134,11 +133,13 @@ class _TIMUIKitVideoElemState extends TIMUIKitState<TIMUIKitVideoElem> {
widget.message.videoElem!.videoUrl == '') { widget.message.videoElem!.videoUrl == '') {
final response = await _messageService.getMessageOnlineUrl( final response = await _messageService.getMessageOnlineUrl(
msgID: widget.message.msgID!); msgID: widget.message.msgID!);
if(response.data != null){
widget.message.videoElem = response.data!.videoElem; widget.message.videoElem = response.data!.videoElem;
Future.delayed(const Duration(microseconds: 10), () { Future.delayed(const Duration(microseconds: 10), () {
setState(() => stateElement = response.data!.videoElem!); setState(() => stateElement = response.data!.videoElem!);
}); });
} }
}
if (!PlatformUtils().isWeb) { if (!PlatformUtils().isWeb) {
if (widget.message.videoElem!.localVideoUrl == null || if (widget.message.videoElem!.localVideoUrl == null ||
widget.message.videoElem!.localVideoUrl == '') { widget.message.videoElem!.localVideoUrl == '') {
@ -185,9 +186,7 @@ class _TIMUIKitVideoElemState extends TIMUIKitState<TIMUIKitVideoElem> {
), ),
); );
}, },
child: ScreenUtilInit( child: Hero(
builder: (BuildContext context, Widget? child) {
return Hero(
tag: heroTag, tag: heroTag,
child: TIMUIKitMessageReactionWrapper( child: TIMUIKitMessageReactionWrapper(
chatModel: widget.chatModel, chatModel: widget.chatModel,
@ -221,15 +220,6 @@ class _TIMUIKitVideoElemState extends TIMUIKitState<TIMUIKitVideoElem> {
aspectRatio: positionRadio, aspectRatio: positionRadio,
child: Stack( child: Stack(
children: <Widget>[ children: <Widget>[
if (stateElement.snapshotUrl != null ||
stateElement.snapshotUrl != null)
AspectRatio(
aspectRatio: positionRadio,
child: Container(
decoration: const BoxDecoration(
color: Colors.transparent),
),
),
Row( Row(
children: [ children: [
Expanded( Expanded(
@ -269,11 +259,10 @@ class _TIMUIKitVideoElemState extends TIMUIKitState<TIMUIKitVideoElem> {
fontSize: 12))), fontSize: 12))),
], ],
), ),
)); )
);
}), }),
))); ))),
},
),
); );
} }
} }

View File

@ -443,14 +443,6 @@ packages:
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "0.0.15" version: "0.0.15"
flutter_screenutil:
dependency: "direct main"
description:
name: flutter_screenutil
sha256: "8e049ecdc1a62c90e6bf0e9c8398ace8dde81b92889c70cfe06281d79d59113a"
url: "https://pub.dev"
source: hosted
version: "5.6.1"
flutter_slidable_for_tencent_im: flutter_slidable_for_tencent_im:
dependency: "direct main" dependency: "direct main"
description: description:
@ -1225,10 +1217,10 @@ packages:
dependency: "direct main" dependency: "direct main"
description: description:
name: tencent_im_base name: tencent_im_base
sha256: "2c8fd0f47d6b22d234f24042c5ac66febe6d71b7c9e131c95031e931efe9aa7b" sha256: bbd2d70c82b018ce86c421f0b4eb02f650456d0bbd7ea5558110139c7b04c4b4
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "1.0.20" version: "1.0.21"
tencent_im_sdk_plugin_platform_interface: tencent_im_sdk_plugin_platform_interface:
dependency: transitive dependency: transitive
description: description:

View File

@ -1,6 +1,6 @@
name: tencent_cloud_chat_uikit name: tencent_cloud_chat_uikit
description: Chat UI components library and basic chat business logic for Tencent Cloud Chat, helping you build In-APP Chat module easily. description: Chat UI components library and basic chat business logic for Tencent Cloud Chat, helping you build In-APP Chat module easily.
version: 1.5.0 version: 1.5.0+1
homepage: https://www.tencentcloud.com/products/im?from=pub homepage: https://www.tencentcloud.com/products/im?from=pub
repository: https://github.com/TencentCloud/chat-uikit-flutter repository: https://github.com/TencentCloud/chat-uikit-flutter
documentation: https://comm.qq.com/im/doc/flutter/en/TUIKit/readme.html documentation: https://comm.qq.com/im/doc/flutter/en/TUIKit/readme.html
@ -57,12 +57,11 @@ dependencies:
loading_animation_widget: ^1.1.0+3 loading_animation_widget: ^1.1.0+3
permission_handler: ^10.0.0 permission_handler: ^10.0.0
tuple: ^2.0.0 tuple: ^2.0.0
flutter_screenutil: ^5.5.3+2
flutter_markdown: ^0.6.9 flutter_markdown: ^0.6.9
url_launcher: ^6.1.4 url_launcher: ^6.1.4
universal_html: ^2.0.8 universal_html: ^2.0.8
link_preview_generator: ^1.2.0 link_preview_generator: ^1.2.0
tencent_im_base: ^1.0.20 tencent_im_base: ^1.0.21
disk_space: ^0.2.1 disk_space: ^0.2.1
http: ^0.13.5 http: ^0.13.5
crypto: ^3.0.2 crypto: ^3.0.2