update flutter uikit to 1.3.2

This commit is contained in:
anonymous 2023-01-12 17:40:29 +08:00
parent 1d02ac67c2
commit e0bb3127c8
10 changed files with 70 additions and 27 deletions

View File

@ -1,4 +1,13 @@
## 1.3.2
* Fix: Text input field height, after choosing to mention someone.
## 1.3.1
* Optimize: Improve performance.
## 1.3.0 ## 1.3.0
* Fix: Group tips not shows the nickname or remarks when transferring group owner. * Fix: Group tips not shows the nickname or remarks when transferring group owner.
* Optimize: Remove the confirmation pop-up before opening the file. * Optimize: Remove the confirmation pop-up before opening the file.
@ -11,8 +20,8 @@
## 1.1.0 And 1.1.0+1 ## 1.1.0 And 1.1.0+1
* Add: Supports two new languages, Japanese and Korean. * Add: Supports two new languages, Japanese and Korean.
* Add: Supports adding new other languages, apart from our default ones, including English, Chinese(Simplified and Traditional), Japanese and Korean, or modifying the translations, refers to [this documentation](https://www.tencentcloud.com/document/product/1047/52154). * Add: Supports adding new other languages, apart from our default ones, including English, Chinese(Simplified and Traditional), Japanese and Korean, or modifying the translations, refers to [this documentation](https://www.tencentcloud.com/document/product/1047/52154?from=pub).
* Add: Sticker plug-in has been embedded in TUIKit by default. Now we support three types of stickers, Unicode Emoji, small image emoji and big image stickers, the usage has been optimized, refers to [this documentation](https://www.tencentcloud.com/document/product/1047/52227). * Add: Sticker plug-in has been embedded in TUIKit by default. Now we support three types of stickers, Unicode Emoji, small image emoji and big image stickers, the usage has been optimized, refers to [this documentation](https://www.tencentcloud.com/document/product/1047/52227?from=pub).
* Optimize: Themes, more customization. * Optimize: Themes, more customization.
* Optimize: The animation of the input area, keyboard, sticker panel and the more panel. * Optimize: The animation of the input area, keyboard, sticker panel and the more panel.
* Optimize: Emoji, both Unicode and small images, can be inserted to any position in text messages. * Optimize: Emoji, both Unicode and small images, can be inserted to any position in text messages.
@ -30,7 +39,7 @@
## 1.0.0 ## 1.0.0
* Add: Support adding Flutter module to Native APP, for details, please refer to [this documentation](https://www.tencentcloud.com/document/product/1047/51456) to implement. * Add: Support adding Flutter module to Native APP, for details, please refer to [this documentation](https://www.tencentcloud.com/document/product/1047/51456?from=pub) to implement.
* Add: Customize sticker and Emoji for text messages. For details, please refer to [this documentation](https://cloud.tencent.com/document/product/269/80882) to modify. * Add: Customize sticker and Emoji for text messages. For details, please refer to [this documentation](https://cloud.tencent.com/document/product/269/80882) to modify.
* Optimize: The loading duration for history message list, especially with lots of media and file messages. * Optimize: The loading duration for history message list, especially with lots of media and file messages.
* Optimize: More panel area supports scroll. * Optimize: More panel area supports scroll.

22
LICENSE
View File

@ -1,7 +1,6 @@
Apache License
Apache License
Version 2.0, January 2004 Version 2.0, January 2004
https://www.apache.org/licenses/ http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
@ -176,16 +175,27 @@
END OF TERMS AND CONDITIONS END OF TERMS AND CONDITIONS
Copyright 2013-2018 Docker, Inc. APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright [2023] [Tencent]
Licensed under the Apache License, Version 2.0 (the "License"); Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License. you may not use this file except in compliance with the License.
You may obtain a copy of the License at You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0 http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS, distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and See the License for the specific language governing permissions and
limitations under the License. limitations under the License.

View File

@ -970,7 +970,7 @@ packages:
path: ".." path: ".."
relative: true relative: true
source: path source: path
version: "1.3.0" version: "1.3.2"
tencent_extended_text: tencent_extended_text:
dependency: transitive dependency: transitive
description: description:

View File

@ -26,9 +26,9 @@ class _TIMUIKitGroupTipsElemState extends TIMUIKitState<TIMUIKitGroupTipsElem> {
} }
void getText() async { void getText() async {
setState(() async { final newText = await MessageUtils.groupTipsMessageAbstract(widget.groupTipsElem, widget.groupMemberList);
groupTipsAbstractText = setState(() {
await MessageUtils.groupTipsMessageAbstract(widget.groupTipsElem, widget.groupMemberList); groupTipsAbstractText = newText;
}); });
} }

View File

@ -874,8 +874,7 @@ class _InputTextFieldState extends TIMUIKitState<TIMUIKitInputTextField> {
showAtBackground: true, showAtBackground: true,
)), )),
onChanged: (bool visibility) { onChanged: (bool visibility) {
if (showKeyboard != visibility && if (showKeyboard != visibility) {
visibility == false) {
setState(() { setState(() {
showKeyboard = visibility; showKeyboard = visibility;
}); });

View File

@ -55,9 +55,9 @@ class _TIMUIKitLastMsgState extends TIMUIKitState<TIMUIKitLastMsg> {
"{{option1}}撤回了一条消息", "$option1撤回了一条消息")(option1: option1); "{{option1}}撤回了一条消息", "$option1撤回了一条消息")(option1: option1);
}); });
} else { } else {
setState(() async { final newText = await _getLastMsgShowText(widget.lastMsg, widget.context);
groupTipsAbstractText = setState(() {
await _getLastMsgShowText(widget.lastMsg, widget.context); groupTipsAbstractText = newText;
}); });
} }
} }

View File

@ -14,6 +14,7 @@ class TIMUIKitSearchInput extends StatefulWidget {
final Widget? prefixIcon; final Widget? prefixIcon;
final Widget? prefixText; final Widget? prefixText;
final bool? isAutoFocus; final bool? isAutoFocus;
final FocusNode focusNode;
const TIMUIKitSearchInput({ const TIMUIKitSearchInput({
required this.onChange, required this.onChange,
@ -23,6 +24,7 @@ class TIMUIKitSearchInput extends StatefulWidget {
this.prefixIcon, this.prefixIcon,
this.isAutoFocus = true, this.isAutoFocus = true,
this.prefixText, this.prefixText,
required this.focusNode,
}) : super(key: key); }) : super(key: key);
@override @override
@ -30,7 +32,6 @@ class TIMUIKitSearchInput extends StatefulWidget {
} }
class TIMUIKitSearchInputState extends TIMUIKitState<TIMUIKitSearchInput> { class TIMUIKitSearchInputState extends TIMUIKitState<TIMUIKitSearchInput> {
late FocusNode focusNode = FocusNode();
late TextEditingController textEditingController = late TextEditingController textEditingController =
widget.controller ?? TextEditingController(); widget.controller ?? TextEditingController();
bool isEmptyInput = true; bool isEmptyInput = true;
@ -43,7 +44,7 @@ class TIMUIKitSearchInputState extends TIMUIKitState<TIMUIKitSearchInput> {
} }
hideAllPanel() { hideAllPanel() {
focusNode.unfocus(); widget.focusNode.unfocus();
} }
@override @override
@ -79,7 +80,7 @@ class TIMUIKitSearchInputState extends TIMUIKitState<TIMUIKitSearchInput> {
textInputAction: TextInputAction.search, textInputAction: TextInputAction.search,
maxLines: 4, maxLines: 4,
minLines: 1, minLines: 1,
focusNode: focusNode, focusNode: widget.focusNode,
controller: textEditingController, controller: textEditingController,
textAlignVertical: TextAlignVertical.center, textAlignVertical: TextAlignVertical.center,
decoration: InputDecoration( decoration: InputDecoration(

View File

@ -51,6 +51,7 @@ class TIMUIKitSearch extends StatefulWidget {
class TIMUIKitSearchState extends TIMUIKitState<TIMUIKitSearch> { class TIMUIKitSearchState extends TIMUIKitState<TIMUIKitSearch> {
late TextEditingController textEditingController = TextEditingController(); late TextEditingController textEditingController = TextEditingController();
final model = serviceLocator<TUISearchViewModel>(); final model = serviceLocator<TUISearchViewModel>();
final FocusNode focusNode = FocusNode();
GlobalKey<dynamic> inputTextField = GlobalKey(); GlobalKey<dynamic> inputTextField = GlobalKey();
List<SearchType> searchTypes = [ List<SearchType> searchTypes = [
SearchType.group, SearchType.group,
@ -96,6 +97,7 @@ class TIMUIKitSearchState extends TIMUIKitState<TIMUIKitSearch> {
mainAxisAlignment: MainAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start,
children: [ children: [
TIMUIKitSearchInput( TIMUIKitSearchInput(
focusNode: focusNode,
key: inputTextField, key: inputTextField,
isAutoFocus: widget.isAutoFocus, isAutoFocus: widget.isAutoFocus,
onChange: (String value) { onChange: (String value) {
@ -127,12 +129,25 @@ class TIMUIKitSearchState extends TIMUIKitState<TIMUIKitSearch> {
), ),
if (searchTypes.contains(SearchType.contact)) if (searchTypes.contains(SearchType.contact))
TIMUIKitSearchFriend( TIMUIKitSearchFriend(
onTapConversation: widget.onTapConversation, onTapConversation: (conversation, message) {
focusNode.unfocus();
Future.delayed(const Duration(milliseconds: 100),
() {
widget.onTapConversation(conversation, message);
});
},
friendResultList: friendResultList), friendResultList: friendResultList),
if (searchTypes.contains(SearchType.group)) if (searchTypes.contains(SearchType.group))
TIMUIKitSearchGroup( TIMUIKitSearchGroup(
groupList: groupList, groupList: groupList,
onTapConversation: widget.onTapConversation), onTapConversation: (conversation, message) {
focusNode.unfocus();
Future.delayed(const Duration(milliseconds: 100),
() {
widget.onTapConversation(conversation, message);
});
},
),
if (searchTypes.contains(SearchType.history)) if (searchTypes.contains(SearchType.history))
TIMUIKitSearchMsg( TIMUIKitSearchMsg(
onTapConversation: widget.onTapConversation, onTapConversation: widget.onTapConversation,

View File

@ -41,6 +41,7 @@ class TIMUIKitSearchMsgDetailState
final model = serviceLocator<TUISearchViewModel>(); final model = serviceLocator<TUISearchViewModel>();
String keywordState = ""; String keywordState = "";
int currentPage = 0; int currentPage = 0;
final FocusNode focusNode = FocusNode();
@override @override
void initState() { void initState() {
@ -96,10 +97,17 @@ class TIMUIKitSearchMsgDetailState
), ),
child: TIMUIKitSearchItem( child: TIMUIKitSearchItem(
faceUrl: message.faceUrl ?? "", faceUrl: message.faceUrl ?? "",
showName: message.nickName ?? message.userID ?? message.sender ?? "", showName: TencentUtils.checkString(message.nickName) ??
lineOne: message.nickName ?? message.userID ?? message.sender ?? "", TencentUtils.checkString(message.userID) ??
message.sender ??
"",
lineOne: TencentUtils.checkString(message.nickName) ??
TencentUtils.checkString(message.userID) ??
message.sender ??
"",
lineTwo: _getMsgElem(message), lineTwo: _getMsgElem(message),
onClick: () { onClick: () {
focusNode.unfocus();
widget.onTapConversation(widget.currentConversation, message); widget.onTapConversation(widget.currentConversation, message);
}, },
), ),
@ -165,6 +173,7 @@ class TIMUIKitSearchMsgDetailState
body: Column( body: Column(
children: [ children: [
TIMUIKitSearchInput( TIMUIKitSearchInput(
focusNode: focusNode,
isAutoFocus: widget.isAutoFocus, isAutoFocus: widget.isAutoFocus,
onChange: (String value) { onChange: (String value) {
updateMsgResult(value, true); updateMsgResult(value, true);

View File

@ -1,6 +1,6 @@
name: tencent_cloud_chat_uikit name: tencent_cloud_chat_uikit
description: UI components library and basic chat business logic for Tencent Cloud Chat service, helping you build In-APP Chat module easily. description: UI components library and basic chat business logic for Tencent Cloud Chat service, helping you build In-APP Chat module easily.
version: 1.3.0 version: 1.3.2
homepage: https://www.tencentcloud.com/products/im?from=pub homepage: https://www.tencentcloud.com/products/im?from=pub
repository: https://github.com/TencentCloud/tc-chat-uikit-flutter repository: https://github.com/TencentCloud/tc-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