Merge remote-tracking branch 'origin/main' into main

This commit is contained in:
YangYuhao 2023-07-08 11:11:59 +08:00
commit 91a4a5b438
5 changed files with 120 additions and 36 deletions

View File

@ -1,6 +1,7 @@
import 'dart:async';
import 'dart:convert';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:tencent_cloud_chat_uikit/ui/utils/screen_utils.dart';
import 'package:tencent_extended_text/extended_text.dart';
import 'package:flutter/material.dart';
@ -174,13 +175,13 @@ class _TIMTextElemState extends TIMUIKitState<TIMTextElem> {
final borderRadius = widget.isFromSelf
? const BorderRadius.only(
topLeft: Radius.circular(10),
topRight: Radius.circular(2),
bottomLeft: Radius.circular(10),
bottomRight: Radius.circular(10))
: const BorderRadius.only(
topLeft: Radius.circular(2),
topRight: Radius.circular(10),
bottomLeft: Radius.circular(10),
bottomRight: Radius.circular(2))
: const BorderRadius.only(
topLeft: Radius.circular(10),
topRight: Radius.circular(10),
bottomLeft: Radius.circular(2),
bottomRight: Radius.circular(10));
if ((widget.chatModel.jumpMsgID == widget.message.msgID)) {}
if (widget.isShowJump) {
@ -205,10 +206,22 @@ class _TIMTextElemState extends TIMUIKitState<TIMTextElem> {
? const Color.fromRGBO(245, 166, 35, 1)
: (defaultStyle ?? widget.backgroundColor);
return Container(
padding: widget.textPadding ?? EdgeInsets.all(isDesktopScreen ? 12 : 10),
if (!widget.isFromSelf) {
return
Container(
decoration: BoxDecoration(
color: backgroundColor,
gradient:
LinearGradient(colors: [Color(0xFF04FCFB), Color(0xFFE540FE)]),
// color: backgroundColor,
borderRadius: widget.borderRadius ?? borderRadius,
),
child:Container(
margin: EdgeInsets.all(1),
padding:
widget.textPadding ?? EdgeInsets.all(isDesktopScreen ? 11 : 9),
decoration: BoxDecoration(
color: const Color(0xFF493E5C),
// color: backgroundColor,
borderRadius: widget.borderRadius ?? borderRadius,
),
constraints:
@ -220,16 +233,66 @@ class _TIMTextElemState extends TIMUIKitState<TIMTextElem> {
// You can render the widget from extension directly, with a [TextStyle] optionally.
widget.chatModel.chatConfig.urlPreviewType != UrlPreviewType.none
? textWithLink!(
style: widget.fontStyle ??
TextStyle(
style: TextStyle(
fontSize: isDesktopScreen ? 14 : 16,
color:
widget.isFromSelf ? Colors.black : Colors.white,
textBaseline: TextBaseline.ideographic,
height: widget.chatModel.chatConfig.textHeight))
: ExtendedText(widget.message.textElem?.text ?? "",
softWrap: true,
style: widget.fontStyle ??
TextStyle(
style: TextStyle(
fontSize: isDesktopScreen ? 14 : 16,
color:
widget.isFromSelf ? Colors.black : Colors.white,
height: widget.chatModel.chatConfig.textHeight),
specialTextSpanBuilder: DefaultSpecialTextSpanBuilder(
isUseDefaultEmoji: widget.isUseDefaultEmoji,
customEmojiStickerList: widget.customEmojiStickerList,
showAtBackground: true,
)),
// If the link preview info is available, render the preview card.
if (_renderPreviewWidget() != null &&
widget.chatModel.chatConfig.urlPreviewType ==
UrlPreviewType.previewCardAndHyperlink)
_renderPreviewWidget()!,
if (widget.isShowMessageReaction ?? true)
TIMUIKitMessageReactionShowPanel(message: widget.message)
],
),
),
);
}
return Container(
padding:
widget.textPadding ?? EdgeInsets.all(isDesktopScreen ? 12 : 10),
decoration: BoxDecoration(
gradient:
LinearGradient(colors: [Color(0xFF04FCFB), Color(0xFFE540FE)]),
// color: backgroundColor,
borderRadius: widget.borderRadius ?? borderRadius,
),
constraints:
BoxConstraints(maxWidth: MediaQuery.of(context).size.width * 0.6),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
// If the [elemType] is text message, it will not be null here.
// You can render the widget from extension directly, with a [TextStyle] optionally.
widget.chatModel.chatConfig.urlPreviewType != UrlPreviewType.none
? textWithLink!(
style: TextStyle(
fontSize: isDesktopScreen ? 14 : 16,
color:
widget.isFromSelf ? Colors.black : Colors.white,
textBaseline: TextBaseline.ideographic,
height: widget.chatModel.chatConfig.textHeight))
: ExtendedText(widget.message.textElem?.text ?? "",
softWrap: true,
style: TextStyle(
fontSize: isDesktopScreen ? 14 : 16,
color:
widget.isFromSelf ? Colors.black : Colors.white,
height: widget.chatModel.chatConfig.textHeight),
specialTextSpanBuilder: DefaultSpecialTextSpanBuilder(
isUseDefaultEmoji: widget.isUseDefaultEmoji,
@ -246,5 +309,6 @@ class _TIMTextElemState extends TIMUIKitState<TIMTextElem> {
],
),
);
}
}

View File

@ -618,10 +618,10 @@ class _InfoListViewState extends State<InfoListView> with AutomaticKeepAliveClie
),
GestureDetector(
onTap: () {
if (widget.bean.is_limit) {
showJoinCiclePiker(widget.bean.id.toString(),widget.bean.amount.toString(),widget.bean.oldAmount.toString(),1);
return;
}
// if (widget.bean.is_limit) {
// showJoinCiclePiker(widget.bean.id.toString(),widget.bean.amount.toString(),widget.bean.oldAmount.toString(),1);
// return;
// }
pushHomePage(lists, lists.id.toString());
},
child: ClipOval(
@ -847,7 +847,7 @@ class _InfoListViewState extends State<InfoListView> with AutomaticKeepAliveClie
// showJoinCiclePiker(widget.bean.id.toString(),widget.bean.amount.toString(),widget.bean.oldAmount.toString(),1);
// return;
// }
pushOtherPeopleHomePage(element.id.toString());
// pushOtherPeopleHomePage(element.id.toString());
},
child: circleWidget(element.avatar!,element.id.toString(), width: 24),
),
@ -913,10 +913,10 @@ class _InfoListViewState extends State<InfoListView> with AutomaticKeepAliveClie
),
GestureDetector(
onTap: () {
if (widget.bean.is_limit) {
showJoinCiclePiker(widget.bean.id.toString(),widget.bean.amount.toString(),widget.bean.oldAmount.toString(),1);
return;
}
// if (widget.bean.is_limit) {
// showJoinCiclePiker(widget.bean.id.toString(),widget.bean.amount.toString(),widget.bean.oldAmount.toString(),1);
// return;
// }
pushHomePage(
lists, widget.bean.id.toString());
},

View File

@ -14,7 +14,24 @@ class Open_vip_tipPage extends StatelessWidget {
@override
Widget build(BuildContext context) {
List vipFuncList = ['1', '2', '3', '4', '5', '6', '7', '8', '9'];
List vipFuncList = ["身份标识",
"专属客服",
"无限畅聊",
"至尊喊话",
"图片私聊",
"视频私聊",
"看谁喜欢你",
"看谁看过你",
"缘分匹配"];
List vipDescList = ['会员专属,更显尊贵',"给您更加贴心的服务",
"可以随心所欲畅聊",
"发布的喊话在圈内凸显",
"聊天可以一直使用图片",
"聊天可以一直使用视频",
"看到所有喜欢你的人",
"看到所有看过你的人",
"为您匹配更合适的人"];
// for (int i = 1; i < 10; i++) {
//
// }
@ -51,7 +68,7 @@ class Open_vip_tipPage extends StatelessWidget {
Positioned(
top: 24.sp,
child: Text(
'兽迷会员十大特权',
'会员九大特权',
style: TextStyle(color: Colors.white, fontSize: 16.sp),
)),
Positioned(
@ -63,7 +80,7 @@ class Open_vip_tipPage extends StatelessWidget {
itemCount: vipFuncList.length,
itemBuilder: (BuildContext context, int index) {
return funcItem(vipFuncList[index],
vipFuncList[index] + '111', index+1);
vipDescList[index], index+1);
},
loop: true,
autoplay:true,

View File

@ -29,7 +29,8 @@ loginIM(String userId,String sig) async {
//退IM
logoutIM() async {
await coreInstance.logout();
final result = await coreInstance.logout();
print(result.desc + '退出IM');
}
//

View File

@ -2,6 +2,7 @@ import 'dart:io';
import 'dart:ui';
import 'package:circle_app/common/values/values.dart';
import 'package:circle_app/main.dart';
import 'package:circle_app/router/app_routers.dart';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
@ -130,6 +131,7 @@ String convertToTenThousand(int number) {
}
}
pushLoginPage() async{
logoutIM();
SharedPreferencesHelper.getInstance().then((sharedPreferences) {
sharedPreferences.clear();
});