Merge remote-tracking branch 'origin/main' into main
This commit is contained in:
commit
91a4a5b438
@ -1,6 +1,7 @@
|
|||||||
import 'dart:async';
|
import 'dart:async';
|
||||||
import 'dart:convert';
|
import 'dart:convert';
|
||||||
|
|
||||||
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||||
import 'package:tencent_cloud_chat_uikit/ui/utils/screen_utils.dart';
|
import 'package:tencent_cloud_chat_uikit/ui/utils/screen_utils.dart';
|
||||||
import 'package:tencent_extended_text/extended_text.dart';
|
import 'package:tencent_extended_text/extended_text.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
@ -174,13 +175,13 @@ class _TIMTextElemState extends TIMUIKitState<TIMTextElem> {
|
|||||||
final borderRadius = widget.isFromSelf
|
final borderRadius = widget.isFromSelf
|
||||||
? const BorderRadius.only(
|
? const BorderRadius.only(
|
||||||
topLeft: Radius.circular(10),
|
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),
|
topRight: Radius.circular(10),
|
||||||
bottomLeft: 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));
|
bottomRight: Radius.circular(10));
|
||||||
if ((widget.chatModel.jumpMsgID == widget.message.msgID)) {}
|
if ((widget.chatModel.jumpMsgID == widget.message.msgID)) {}
|
||||||
if (widget.isShowJump) {
|
if (widget.isShowJump) {
|
||||||
@ -205,10 +206,22 @@ class _TIMTextElemState extends TIMUIKitState<TIMTextElem> {
|
|||||||
? const Color.fromRGBO(245, 166, 35, 1)
|
? const Color.fromRGBO(245, 166, 35, 1)
|
||||||
: (defaultStyle ?? widget.backgroundColor);
|
: (defaultStyle ?? widget.backgroundColor);
|
||||||
|
|
||||||
return Container(
|
if (!widget.isFromSelf) {
|
||||||
padding: widget.textPadding ?? EdgeInsets.all(isDesktopScreen ? 12 : 10),
|
return
|
||||||
|
Container(
|
||||||
decoration: BoxDecoration(
|
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,
|
borderRadius: widget.borderRadius ?? borderRadius,
|
||||||
),
|
),
|
||||||
constraints:
|
constraints:
|
||||||
@ -220,16 +233,66 @@ class _TIMTextElemState extends TIMUIKitState<TIMTextElem> {
|
|||||||
// You can render the widget from extension directly, with a [TextStyle] optionally.
|
// You can render the widget from extension directly, with a [TextStyle] optionally.
|
||||||
widget.chatModel.chatConfig.urlPreviewType != UrlPreviewType.none
|
widget.chatModel.chatConfig.urlPreviewType != UrlPreviewType.none
|
||||||
? textWithLink!(
|
? textWithLink!(
|
||||||
style: widget.fontStyle ??
|
style: TextStyle(
|
||||||
TextStyle(
|
|
||||||
fontSize: isDesktopScreen ? 14 : 16,
|
fontSize: isDesktopScreen ? 14 : 16,
|
||||||
|
color:
|
||||||
|
widget.isFromSelf ? Colors.black : Colors.white,
|
||||||
textBaseline: TextBaseline.ideographic,
|
textBaseline: TextBaseline.ideographic,
|
||||||
height: widget.chatModel.chatConfig.textHeight))
|
height: widget.chatModel.chatConfig.textHeight))
|
||||||
: ExtendedText(widget.message.textElem?.text ?? "",
|
: ExtendedText(widget.message.textElem?.text ?? "",
|
||||||
softWrap: true,
|
softWrap: true,
|
||||||
style: widget.fontStyle ??
|
style: TextStyle(
|
||||||
TextStyle(
|
|
||||||
fontSize: isDesktopScreen ? 14 : 16,
|
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),
|
height: widget.chatModel.chatConfig.textHeight),
|
||||||
specialTextSpanBuilder: DefaultSpecialTextSpanBuilder(
|
specialTextSpanBuilder: DefaultSpecialTextSpanBuilder(
|
||||||
isUseDefaultEmoji: widget.isUseDefaultEmoji,
|
isUseDefaultEmoji: widget.isUseDefaultEmoji,
|
||||||
@ -246,5 +309,6 @@ class _TIMTextElemState extends TIMUIKitState<TIMTextElem> {
|
|||||||
],
|
],
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -618,10 +618,10 @@ class _InfoListViewState extends State<InfoListView> with AutomaticKeepAliveClie
|
|||||||
),
|
),
|
||||||
GestureDetector(
|
GestureDetector(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
if (widget.bean.is_limit) {
|
// if (widget.bean.is_limit) {
|
||||||
showJoinCiclePiker(widget.bean.id.toString(),widget.bean.amount.toString(),widget.bean.oldAmount.toString(),1);
|
// showJoinCiclePiker(widget.bean.id.toString(),widget.bean.amount.toString(),widget.bean.oldAmount.toString(),1);
|
||||||
return;
|
// return;
|
||||||
}
|
// }
|
||||||
pushHomePage(lists, lists.id.toString());
|
pushHomePage(lists, lists.id.toString());
|
||||||
},
|
},
|
||||||
child: ClipOval(
|
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);
|
// showJoinCiclePiker(widget.bean.id.toString(),widget.bean.amount.toString(),widget.bean.oldAmount.toString(),1);
|
||||||
// return;
|
// return;
|
||||||
// }
|
// }
|
||||||
pushOtherPeopleHomePage(element.id.toString());
|
// pushOtherPeopleHomePage(element.id.toString());
|
||||||
},
|
},
|
||||||
child: circleWidget(element.avatar!,element.id.toString(), width: 24),
|
child: circleWidget(element.avatar!,element.id.toString(), width: 24),
|
||||||
),
|
),
|
||||||
@ -913,10 +913,10 @@ class _InfoListViewState extends State<InfoListView> with AutomaticKeepAliveClie
|
|||||||
),
|
),
|
||||||
GestureDetector(
|
GestureDetector(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
if (widget.bean.is_limit) {
|
// if (widget.bean.is_limit) {
|
||||||
showJoinCiclePiker(widget.bean.id.toString(),widget.bean.amount.toString(),widget.bean.oldAmount.toString(),1);
|
// showJoinCiclePiker(widget.bean.id.toString(),widget.bean.amount.toString(),widget.bean.oldAmount.toString(),1);
|
||||||
return;
|
// return;
|
||||||
}
|
// }
|
||||||
pushHomePage(
|
pushHomePage(
|
||||||
lists, widget.bean.id.toString());
|
lists, widget.bean.id.toString());
|
||||||
},
|
},
|
||||||
|
|||||||
@ -14,7 +14,24 @@ class Open_vip_tipPage extends StatelessWidget {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
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++) {
|
// for (int i = 1; i < 10; i++) {
|
||||||
//
|
//
|
||||||
// }
|
// }
|
||||||
@ -51,7 +68,7 @@ class Open_vip_tipPage extends StatelessWidget {
|
|||||||
Positioned(
|
Positioned(
|
||||||
top: 24.sp,
|
top: 24.sp,
|
||||||
child: Text(
|
child: Text(
|
||||||
'兽迷会员十大特权',
|
'会员九大特权',
|
||||||
style: TextStyle(color: Colors.white, fontSize: 16.sp),
|
style: TextStyle(color: Colors.white, fontSize: 16.sp),
|
||||||
)),
|
)),
|
||||||
Positioned(
|
Positioned(
|
||||||
@ -63,7 +80,7 @@ class Open_vip_tipPage extends StatelessWidget {
|
|||||||
itemCount: vipFuncList.length,
|
itemCount: vipFuncList.length,
|
||||||
itemBuilder: (BuildContext context, int index) {
|
itemBuilder: (BuildContext context, int index) {
|
||||||
return funcItem(vipFuncList[index],
|
return funcItem(vipFuncList[index],
|
||||||
vipFuncList[index] + '111', index+1);
|
vipDescList[index], index+1);
|
||||||
},
|
},
|
||||||
loop: true,
|
loop: true,
|
||||||
autoplay:true,
|
autoplay:true,
|
||||||
|
|||||||
@ -29,7 +29,8 @@ loginIM(String userId,String sig) async {
|
|||||||
|
|
||||||
//退出IM
|
//退出IM
|
||||||
logoutIM() async {
|
logoutIM() async {
|
||||||
await coreInstance.logout();
|
final result = await coreInstance.logout();
|
||||||
|
print(result.desc + '退出IM');
|
||||||
}
|
}
|
||||||
|
|
||||||
//跳转发消息页面
|
//跳转发消息页面
|
||||||
|
|||||||
@ -2,6 +2,7 @@ import 'dart:io';
|
|||||||
import 'dart:ui';
|
import 'dart:ui';
|
||||||
|
|
||||||
import 'package:circle_app/common/values/values.dart';
|
import 'package:circle_app/common/values/values.dart';
|
||||||
|
import 'package:circle_app/main.dart';
|
||||||
import 'package:circle_app/router/app_routers.dart';
|
import 'package:circle_app/router/app_routers.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||||
@ -130,6 +131,7 @@ String convertToTenThousand(int number) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
pushLoginPage() async{
|
pushLoginPage() async{
|
||||||
|
logoutIM();
|
||||||
SharedPreferencesHelper.getInstance().then((sharedPreferences) {
|
SharedPreferencesHelper.getInstance().then((sharedPreferences) {
|
||||||
sharedPreferences.clear();
|
sharedPreferences.clear();
|
||||||
});
|
});
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user