修改IMUI,退出登录退出IM
This commit is contained in:
parent
3190df9b41
commit
c80d534192
@ -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,14 +206,74 @@ class _TIMTextElemState extends TIMUIKitState<TIMTextElem> {
|
||||
? const Color.fromRGBO(245, 166, 35, 1)
|
||||
: (defaultStyle ?? widget.backgroundColor);
|
||||
|
||||
if (!widget.isFromSelf) {
|
||||
return
|
||||
Container(
|
||||
decoration: BoxDecoration(
|
||||
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:
|
||||
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,
|
||||
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),
|
||||
padding:
|
||||
widget.textPadding ?? EdgeInsets.all(isDesktopScreen ? 12 : 10),
|
||||
decoration: BoxDecoration(
|
||||
color: backgroundColor,
|
||||
gradient:
|
||||
LinearGradient(colors: [Color(0xFF04FCFB), Color(0xFFE540FE)]),
|
||||
// color: backgroundColor,
|
||||
borderRadius: widget.borderRadius ?? borderRadius,
|
||||
),
|
||||
constraints:
|
||||
BoxConstraints(maxWidth: MediaQuery.of(context).size.width * 0.6),
|
||||
BoxConstraints(maxWidth: MediaQuery.of(context).size.width * 0.6),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
@ -220,22 +281,24 @@ 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(
|
||||
fontSize: isDesktopScreen ? 14 : 16,
|
||||
textBaseline: TextBaseline.ideographic,
|
||||
height: widget.chatModel.chatConfig.textHeight))
|
||||
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(
|
||||
fontSize: isDesktopScreen ? 14 : 16,
|
||||
height: widget.chatModel.chatConfig.textHeight),
|
||||
specialTextSpanBuilder: DefaultSpecialTextSpanBuilder(
|
||||
isUseDefaultEmoji: widget.isUseDefaultEmoji,
|
||||
customEmojiStickerList: widget.customEmojiStickerList,
|
||||
showAtBackground: true,
|
||||
)),
|
||||
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,
|
||||
customEmojiStickerList: widget.customEmojiStickerList,
|
||||
showAtBackground: true,
|
||||
)),
|
||||
// If the link preview info is available, render the preview card.
|
||||
if (_renderPreviewWidget() != null &&
|
||||
widget.chatModel.chatConfig.urlPreviewType ==
|
||||
@ -246,5 +309,6 @@ class _TIMTextElemState extends TIMUIKitState<TIMTextElem> {
|
||||
],
|
||||
),
|
||||
);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -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());
|
||||
},
|
||||
|
||||
@ -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,
|
||||
|
||||
@ -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');
|
||||
}
|
||||
|
||||
//跳转发消息页面
|
||||
|
||||
@ -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';
|
||||
@ -132,6 +133,7 @@ String convertToTenThousand(int number) {
|
||||
}
|
||||
}
|
||||
pushLoginPage() async{
|
||||
logoutIM();
|
||||
SharedPreferencesHelper.getInstance().then((sharedPreferences) {
|
||||
sharedPreferences.clear();
|
||||
});
|
||||
|
||||
Loading…
Reference in New Issue
Block a user