update flutter uikit to. 1.6.2
This commit is contained in:
parent
c77c24e562
commit
8cab9d05cd
|
|
@ -1,3 +1,8 @@
|
|||
## 1.6.2
|
||||
|
||||
* Optimize: Remove `fluttertoast`.
|
||||
* Fix: An issue that caused errors when sending files without extensions.
|
||||
|
||||
## 1.6.1
|
||||
|
||||
* Fix: A bug of muting someone in a group.
|
||||
|
|
|
|||
|
|
@ -6,8 +6,6 @@ import 'package:example/TIMUIKitConversationExample.dart';
|
|||
import 'package:example/TIMUIKitProfileExample.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:tencent_cloud_chat_uikit/tencent_cloud_chat_uikit.dart';
|
||||
import 'package:tencent_cloud_chat_uikit/ui/widgets/toast.dart';
|
||||
|
||||
import 'TIMUIKitAddFriendExample.dart';
|
||||
import 'TIMUIKitAddGroupExample.dart';
|
||||
import 'TIMUIKitBlackListExample.dart';
|
||||
|
|
@ -83,7 +81,7 @@ class _MyHomePageState extends State<MyHomePage> {
|
|||
String usersig = GenerateTestUserSig(sdkappid: sdkappid, key: secret)
|
||||
.genSig(identifier: userid, expire: 24 * 7 * 60 * 60 * 1000);
|
||||
if (sdkappid == 0 || userid == '' || secret == '' || usersig == '') {
|
||||
Toast("The running parameters are abnormal, please check");
|
||||
print("The running parameters are abnormal, please check");
|
||||
return;
|
||||
}
|
||||
await timCoreInstance.init(
|
||||
|
|
@ -145,7 +143,7 @@ class _MyHomePageState extends State<MyHomePage> {
|
|||
),
|
||||
);
|
||||
} else {
|
||||
Toast("no such ket");
|
||||
print("no such ket");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -413,14 +413,6 @@ packages:
|
|||
description: flutter
|
||||
source: sdk
|
||||
version: "0.0.0"
|
||||
fluttertoast:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: fluttertoast
|
||||
sha256: "7cc92eabe01e3f1babe1571c5560b135dfc762a34e41e9056881e2196b178ec1"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "8.1.2"
|
||||
get_it:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
|
@ -1080,7 +1072,7 @@ packages:
|
|||
path: ".."
|
||||
relative: true
|
||||
source: path
|
||||
version: "1.6.0"
|
||||
version: "1.6.2"
|
||||
tencent_extended_text:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
// ignore_for_file: constant_identifier_names
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:fluttertoast/fluttertoast.dart';
|
||||
import 'package:tencent_im_base/tencent_im_base.dart';
|
||||
import 'package:tencent_cloud_chat_uikit/data_services/friendShip/friendship_services.dart';
|
||||
import 'package:tencent_cloud_chat_uikit/data_services/services_locatar.dart';
|
||||
|
|
@ -98,15 +97,6 @@ class TUISearchViewModel extends ChangeNotifier {
|
|||
...(searchResult.data!.messageSearchResultItems?[0].messageList ?? [])
|
||||
];
|
||||
}
|
||||
if (searchResult.code != 0) {
|
||||
Fluttertoast.showToast(
|
||||
msg: searchResult.desc,
|
||||
gravity: ToastGravity.BOTTOM,
|
||||
timeInSecForIosWeb: 1,
|
||||
textColor: Colors.white,
|
||||
backgroundColor: Colors.black,
|
||||
);
|
||||
}
|
||||
notifyListeners();
|
||||
}
|
||||
|
||||
|
|
@ -130,15 +120,6 @@ class TUISearchViewModel extends ChangeNotifier {
|
|||
msgList = [...?msgList, ...?searchResult.data!.messageSearchResultItems];
|
||||
totalMsgCount = searchResult.data!.totalCount ?? 0;
|
||||
}
|
||||
if (searchResult.code != 0) {
|
||||
Fluttertoast.showToast(
|
||||
msg: searchResult.desc,
|
||||
gravity: ToastGravity.BOTTOM,
|
||||
timeInSecForIosWeb: 1,
|
||||
textColor: Colors.white,
|
||||
backgroundColor: Colors.black,
|
||||
);
|
||||
}
|
||||
notifyListeners();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -29,7 +29,6 @@ import 'package:tencent_cloud_chat_uikit/ui/utils/permission.dart';
|
|||
import 'package:tencent_cloud_chat_uikit/ui/utils/platform.dart';
|
||||
import 'package:tencent_cloud_chat_uikit/ui/views/TIMUIKitChat/TIMUIKitMessageItem/TIMUIKitMessageReaction/tim_uikit_message_reaction_wrapper.dart';
|
||||
import 'package:tencent_cloud_chat_uikit/ui/widgets/image_screen.dart';
|
||||
import 'package:tencent_cloud_chat_uikit/ui/widgets/toast.dart';
|
||||
import 'package:transparent_image/transparent_image.dart';
|
||||
import 'package:image_gallery_saver/image_gallery_saver.dart';
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,6 @@ import 'dart:async';
|
|||
import 'dart:convert';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:fluttertoast/fluttertoast.dart';
|
||||
import 'package:tencent_im_base/tencent_im_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';
|
||||
|
|
|
|||
|
|
@ -24,7 +24,6 @@ import 'package:tencent_cloud_chat_uikit/ui/utils/permission.dart';
|
|||
import 'package:tencent_cloud_chat_uikit/ui/utils/platform.dart';
|
||||
|
||||
import 'package:tencent_cloud_chat_uikit/ui/views/TIMUIKitChat/TIMUIKitTextField/intl_camer_picker.dart';
|
||||
import 'package:tencent_cloud_chat_uikit/ui/widgets/toast.dart';
|
||||
import 'package:video_thumbnail/video_thumbnail.dart' as video_thumbnail;
|
||||
import 'package:wechat_assets_picker/wechat_assets_picker.dart';
|
||||
import 'package:tencent_cloud_chat_uikit/base_widgets/tim_ui_kit_base.dart';
|
||||
|
|
|
|||
|
|
@ -3,7 +3,6 @@
|
|||
import 'dart:async';
|
||||
import 'dart:io';
|
||||
import 'dart:math';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:permission_handler/permission_handler.dart';
|
||||
import 'package:tencent_im_base/tencent_im_base.dart';
|
||||
|
|
@ -11,14 +10,10 @@ import 'package:provider/provider.dart';
|
|||
import 'package:tencent_cloud_chat_uikit/base_widgets/tim_ui_kit_state.dart';
|
||||
import 'package:tencent_cloud_chat_uikit/business_logic/separate_models/tui_chat_separate_view_model.dart';
|
||||
import 'package:tencent_cloud_chat_uikit/business_logic/view_models/tui_chat_global_model.dart';
|
||||
|
||||
import 'package:tencent_cloud_chat_uikit/data_services/services_locatar.dart';
|
||||
|
||||
import 'package:tencent_cloud_chat_uikit/ui/utils/message.dart';
|
||||
import 'package:tencent_cloud_chat_uikit/ui/utils/permission.dart';
|
||||
import 'package:tencent_cloud_chat_uikit/ui/utils/sound_record.dart';
|
||||
|
||||
import 'package:tencent_cloud_chat_uikit/ui/widgets/toast.dart';
|
||||
import 'package:tencent_cloud_chat_uikit/base_widgets/tim_ui_kit_base.dart';
|
||||
|
||||
class SendSoundMessage extends StatefulWidget {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
// ignore_for_file: file_names
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
|
|
@ -61,12 +60,16 @@ class CustomText extends StatefulWidget {
|
|||
|
||||
class _ExtendTextState extends State<CustomText> {
|
||||
String? text;
|
||||
|
||||
countTextSize() {
|
||||
TextStyle style = widget.style ?? const TextStyle(fontSize: 14);
|
||||
double textwidth = TextSize.boundingTextSize(widget.text, style).width;
|
||||
int offset = widget.offset ?? 3;
|
||||
if (textwidth > widget.width) {
|
||||
int position = widget.text.lastIndexOf('.');
|
||||
if(position < 0){
|
||||
position = widget.text.length;
|
||||
}
|
||||
String overflowtext = widget.overflowtext ?? '...';
|
||||
int overflowtextLength = overflowtext.length;
|
||||
double singTextSize = textwidth / widget.text.length;
|
||||
|
|
|
|||
|
|
@ -1,63 +0,0 @@
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:fluttertoast/fluttertoast.dart';
|
||||
|
||||
enum ToastType { success, fail, info }
|
||||
|
||||
class Toast {
|
||||
static FToast? fToast;
|
||||
|
||||
Toast(String s);
|
||||
static removeToast() {
|
||||
fToast?.removeCustomToast();
|
||||
}
|
||||
|
||||
static removeAllQueuedToasts() {
|
||||
fToast?.removeQueuedCustomToasts();
|
||||
}
|
||||
|
||||
static init(BuildContext context) {
|
||||
fToast = FToast();
|
||||
fToast!.init(context);
|
||||
}
|
||||
|
||||
static IconData generateIcon(ToastType type) {
|
||||
switch (type) {
|
||||
case ToastType.success:
|
||||
return Icons.check;
|
||||
case ToastType.fail:
|
||||
return Icons.close;
|
||||
case ToastType.info:
|
||||
return Icons.info;
|
||||
}
|
||||
}
|
||||
|
||||
static showToast(ToastType type, String msg, BuildContext context) {
|
||||
init(context);
|
||||
fToast!.showToast(
|
||||
child: Container(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 48.0, vertical: 24.0),
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(12.0),
|
||||
color: const Color(0xFF333333),
|
||||
),
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
Padding(
|
||||
padding: const EdgeInsets.fromLTRB(0, 12.0, 0, 36.0),
|
||||
child: Icon(generateIcon(type),
|
||||
size: 64.0, color: Colors.white)),
|
||||
Text(
|
||||
msg,
|
||||
style: const TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 18,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
gravity: ToastGravity.CENTER,
|
||||
toastDuration: const Duration(seconds: 2));
|
||||
}
|
||||
}
|
||||
|
|
@ -3,7 +3,6 @@ import 'dart:io';
|
|||
import 'dart:math';
|
||||
|
||||
import 'package:crypto/crypto.dart';
|
||||
import 'package:fluttertoast/fluttertoast.dart';
|
||||
import 'package:tencent_im_base/tencent_im_base.dart';
|
||||
import 'package:extended_image/extended_image.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
|
@ -78,11 +77,6 @@ class _VideoScreenState extends TIMUIKitState<VideoScreen> {
|
|||
a.remove();
|
||||
});
|
||||
xhr.send();
|
||||
Fluttertoast.showToast(
|
||||
msg: '开始下载',
|
||||
webPosition: 'center',
|
||||
gravity: ToastGravity.CENTER,
|
||||
);
|
||||
return;
|
||||
}
|
||||
if (PlatformUtils().isIOS) {
|
||||
|
|
|
|||
|
|
@ -472,14 +472,6 @@ packages:
|
|||
description: flutter
|
||||
source: sdk
|
||||
version: "0.0.0"
|
||||
fluttertoast:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: fluttertoast
|
||||
sha256: "7cc92eabe01e3f1babe1571c5560b135dfc762a34e41e9056881e2196b178ec1"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "8.1.2"
|
||||
frontend_server_client:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
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.
|
||||
version: 1.6.1
|
||||
version: 1.6.2
|
||||
homepage: https://www.tencentcloud.com/products/im?from=pub
|
||||
repository: https://github.com/TencentCloud/chat-uikit-flutter
|
||||
documentation: https://comm.qq.com/im/doc/flutter/en/TUIKit/readme.html
|
||||
|
|
@ -38,7 +38,6 @@ dependencies:
|
|||
video_thumbnail: ^0.5.2
|
||||
image_gallery_saver: ^1.7.1
|
||||
photo_view: ^0.14.0
|
||||
fluttertoast: ^8.0.8
|
||||
path_provider: ^2.0.8
|
||||
characters: ^1.1.0
|
||||
cached_network_image: ^3.2.0
|
||||
|
|
|
|||
Loading…
Reference in New Issue