修改消息bug和UI
This commit is contained in:
parent
5d6f953858
commit
92065b0cb3
@ -402,96 +402,133 @@ class _TIMUIKItHistoryMessageListItemState
|
|||||||
}
|
}
|
||||||
if (messageItem.customElem?.extension?.contains('cardData') ?? false) {
|
if (messageItem.customElem?.extension?.contains('cardData') ?? false) {
|
||||||
Map info = jsonDecode(messageItem.customElem?.data ?? '');
|
Map info = jsonDecode(messageItem.customElem?.data ?? '');
|
||||||
return Container(
|
return Column(
|
||||||
height: info.containsKey('city') ? 175.sp : 135.sp,
|
children: [
|
||||||
width: Get.width,
|
Container(
|
||||||
margin: EdgeInsets.only(left: isFromSelf ? 16 : 0, right: isFromSelf ? 0 : 16),
|
height: info.containsKey('city') ? 175.sp : 135.sp,
|
||||||
decoration: BoxDecoration(
|
width: Get.width,
|
||||||
image: DecorationImage(
|
margin: EdgeInsets.only(left: isFromSelf ? 16 : 0, right: isFromSelf ? 0 : 16),
|
||||||
fit: BoxFit.fill,
|
decoration: BoxDecoration(
|
||||||
image: AssetImage(
|
image: DecorationImage(
|
||||||
getCircleImage('pic_bg'),
|
|
||||||
))),
|
|
||||||
child: Column(
|
|
||||||
children: [
|
|
||||||
Container(
|
|
||||||
padding: EdgeInsets.only(left: 12.sp, right: 12.sp),
|
|
||||||
// height: 60,
|
|
||||||
child: Column(
|
|
||||||
children: [
|
|
||||||
if (info.containsKey('city'))
|
|
||||||
Container(
|
|
||||||
margin: EdgeInsets.only(top: 10.sp),
|
|
||||||
child: Row(
|
|
||||||
children: [
|
|
||||||
Container(
|
|
||||||
margin: EdgeInsets.only(right: 5.sp),
|
|
||||||
width: 3.sp,
|
|
||||||
height: 3.sp,
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
borderRadius: BorderRadius.circular(1.5.sp),
|
|
||||||
color: Color(0xFF00FFF4)),
|
|
||||||
),
|
|
||||||
Text(
|
|
||||||
info['city'],
|
|
||||||
style: TextStyle(
|
|
||||||
color: Colors.white,
|
|
||||||
fontSize: 14.sp,
|
|
||||||
fontWeight: FontWeight.w500),
|
|
||||||
)
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
if (info.containsKey('both_interests'))
|
|
||||||
Container(
|
|
||||||
margin: EdgeInsets.only(top: 16.sp),
|
|
||||||
child: Row(
|
|
||||||
children: [
|
|
||||||
Container(
|
|
||||||
margin: EdgeInsets.only(right: 5.sp),
|
|
||||||
width: 3,
|
|
||||||
height: 3,
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
borderRadius: BorderRadius.circular(1.5),
|
|
||||||
color: Color(0xFF00FFF4)),
|
|
||||||
),
|
|
||||||
Text(
|
|
||||||
info['both_interests'],
|
|
||||||
style: TextStyle(
|
|
||||||
color: Colors.white,
|
|
||||||
fontSize: 14.sp,
|
|
||||||
fontWeight: FontWeight.w500),
|
|
||||||
)
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
Container(
|
|
||||||
margin: EdgeInsets.only(top: 10.sp, bottom: 10.sp),
|
|
||||||
alignment: Alignment.centerLeft,
|
|
||||||
child: Text(
|
|
||||||
isFromSelf
|
|
||||||
? info['user']['signature']
|
|
||||||
: info['my']['signature'],
|
|
||||||
style: TextStyle(
|
|
||||||
color: Colors.white,
|
|
||||||
fontSize: 14.sp,
|
|
||||||
fontWeight: FontWeight.w500),
|
|
||||||
maxLines: 2,
|
|
||||||
overflow: TextOverflow.ellipsis,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
Image.asset(
|
|
||||||
getCircleImage('line'),
|
|
||||||
width: Get.width,
|
|
||||||
fit: BoxFit.fill,
|
fit: BoxFit.fill,
|
||||||
|
image: AssetImage(
|
||||||
|
getCircleImage('pic_bg'),
|
||||||
|
))),
|
||||||
|
child: Column(
|
||||||
|
children: [
|
||||||
|
Container(
|
||||||
|
padding: EdgeInsets.only(left: 12.sp, right: 12.sp),
|
||||||
|
// height: 60,
|
||||||
|
child: Column(
|
||||||
|
children: [
|
||||||
|
if (info.containsKey('city'))
|
||||||
|
Container(
|
||||||
|
margin: EdgeInsets.only(top: 10.sp),
|
||||||
|
child: Row(
|
||||||
|
children: [
|
||||||
|
Container(
|
||||||
|
margin: EdgeInsets.only(right: 5.sp),
|
||||||
|
width: 3.sp,
|
||||||
|
height: 3.sp,
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
borderRadius: BorderRadius.circular(1.5.sp),
|
||||||
|
color: Color(0xFF00FFF4)),
|
||||||
|
),
|
||||||
|
Text(
|
||||||
|
info['city'],
|
||||||
|
style: TextStyle(
|
||||||
|
color: Colors.white,
|
||||||
|
fontSize: 14.sp,
|
||||||
|
fontWeight: FontWeight.w500),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
if (info.containsKey('both_interests'))
|
||||||
|
Container(
|
||||||
|
margin: EdgeInsets.only(top: 16.sp),
|
||||||
|
child: Row(
|
||||||
|
children: [
|
||||||
|
Container(
|
||||||
|
margin: EdgeInsets.only(right: 5.sp),
|
||||||
|
width: 3,
|
||||||
|
height: 3,
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
borderRadius: BorderRadius.circular(1.5),
|
||||||
|
color: Color(0xFF00FFF4)),
|
||||||
|
),
|
||||||
|
Text(
|
||||||
|
info['both_interests'],
|
||||||
|
style: TextStyle(
|
||||||
|
color: Colors.white,
|
||||||
|
fontSize: 14.sp,
|
||||||
|
fontWeight: FontWeight.w500),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Container(
|
||||||
|
margin: EdgeInsets.only(top: 10.sp, bottom: 10.sp),
|
||||||
|
alignment: Alignment.centerLeft,
|
||||||
|
child: Text(
|
||||||
|
isFromSelf
|
||||||
|
? info['user']['signature']
|
||||||
|
: info['my']['signature'],
|
||||||
|
style: TextStyle(
|
||||||
|
color: Colors.white,
|
||||||
|
fontSize: 14.sp,
|
||||||
|
fontWeight: FontWeight.w500),
|
||||||
|
maxLines: 2,
|
||||||
|
overflow: TextOverflow.ellipsis,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Image.asset(
|
||||||
|
getCircleImage('line'),
|
||||||
|
width: Get.width,
|
||||||
|
fit: BoxFit.fill,
|
||||||
|
),
|
||||||
|
interestWdiget(
|
||||||
|
isFromSelf ? info['interests'] : info['myInterests'])
|
||||||
|
],
|
||||||
),
|
),
|
||||||
interestWdiget(
|
)
|
||||||
isFromSelf ? info['interests'] : info['myInterests'])
|
],
|
||||||
],
|
),
|
||||||
),
|
),
|
||||||
)
|
Container(
|
||||||
],
|
width: Get.width,
|
||||||
),
|
margin: EdgeInsets.only(top: 10.sp,left: isFromSelf ? 16 : 0, right: isFromSelf ? 0 : 16),
|
||||||
|
// margin: EdgeInsets.only(top: 10.sp),
|
||||||
|
child: Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
|
children: [
|
||||||
|
Text(
|
||||||
|
'骂人、诈骗、造谣均属于严重违规行为,请严格遵守',
|
||||||
|
style: TextStyle(
|
||||||
|
color: Colors.white,
|
||||||
|
fontSize: 11.sp,
|
||||||
|
fontWeight: FontWeight.w600),
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
width: 2.sp,
|
||||||
|
),
|
||||||
|
GestureDetector(
|
||||||
|
onTap: (){
|
||||||
|
navigateToUserAgreement();
|
||||||
|
},
|
||||||
|
child: Text(
|
||||||
|
'《文明公约》',
|
||||||
|
style: TextStyle(
|
||||||
|
color: Color(0xff00FFF4),
|
||||||
|
fontSize: 11.sp,
|
||||||
|
fontWeight: FontWeight.w400,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
)
|
||||||
|
],
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -132,7 +132,7 @@ class TIMChat extends StatefulWidget {
|
|||||||
|
|
||||||
final List customEmojiStickerList;
|
final List customEmojiStickerList;
|
||||||
|
|
||||||
final Widget? customAppBar;
|
final PreferredSizeWidget? customAppBar;
|
||||||
|
|
||||||
/// Custom emoji panel.
|
/// Custom emoji panel.
|
||||||
final CustomStickerPanel? customStickerPanel;
|
final CustomStickerPanel? customStickerPanel;
|
||||||
@ -376,16 +376,7 @@ class _TUIChatState extends TIMUIKitState<TIMChat> {
|
|||||||
child: Scaffold(
|
child: Scaffold(
|
||||||
backgroundColor: Colors.transparent,
|
backgroundColor: Colors.transparent,
|
||||||
resizeToAvoidBottomInset: false,
|
resizeToAvoidBottomInset: false,
|
||||||
appBar: (widget.customAppBar == null)
|
appBar:widget.customAppBar!,
|
||||||
? TIMUIKitAppBar(
|
|
||||||
showTotalUnReadCount: widget.showTotalUnReadCount,
|
|
||||||
config: widget.appBarConfig,
|
|
||||||
conversationShowName: _getTitle(),
|
|
||||||
conversationID: _getConvID(),
|
|
||||||
showC2cMessageEditStatus:
|
|
||||||
widget.config?.showC2cMessageEditStatus ?? true,
|
|
||||||
)
|
|
||||||
: null,
|
|
||||||
body: DropTarget(
|
body: DropTarget(
|
||||||
onDragDone: (detail) {
|
onDragDone: (detail) {
|
||||||
setState(() {
|
setState(() {
|
||||||
@ -413,13 +404,13 @@ class _TUIChatState extends TIMUIKitState<TIMChat> {
|
|||||||
children: [
|
children: [
|
||||||
Column(
|
Column(
|
||||||
children: [
|
children: [
|
||||||
if (widget.customAppBar != null) widget.customAppBar!,
|
|
||||||
if (filteredApplicationList.isNotEmpty)
|
if (filteredApplicationList.isNotEmpty)
|
||||||
_renderJoinGroupApplication(
|
_renderJoinGroupApplication(
|
||||||
filteredApplicationList.length, theme),
|
filteredApplicationList.length, theme),
|
||||||
if (widget.topFixWidget != null) widget.topFixWidget!,
|
if (widget.topFixWidget != null) widget.topFixWidget!,
|
||||||
Expanded(
|
Expanded(
|
||||||
child: Container(
|
child: Container(
|
||||||
|
// color: Colors.red,
|
||||||
color: theme.chatBgColor,
|
color: theme.chatBgColor,
|
||||||
child: Align(
|
child: Align(
|
||||||
// key: alignKey,
|
// key: alignKey,
|
||||||
|
|||||||
@ -87,16 +87,17 @@ class _ChatPageState extends State<ChatPage> {
|
|||||||
GroupReceiptAllowType.public
|
GroupReceiptAllowType.public
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
customAppBar: MyAppBar(
|
customAppBar:MyAppBar(
|
||||||
centerTitle: con.showName!,
|
centerTitle: con.showName!,
|
||||||
actionWdiget: GestureDetector(
|
actionWdiget: GestureDetector(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
Get.toNamed(AppRoutes.UserInfoActivity,arguments: con.userID.toString().split('_').last);
|
Get.toNamed(AppRoutes.UserInfoActivity,arguments: con.userID.toString().split('_').last);
|
||||||
},
|
},
|
||||||
child: Text('TA的主页',style: TextStyle(color: Color(0xFF00FFF4),fontSize:12.sp,fontWeight: FontWeight.w500),),
|
child: Text('TA的主页',style: TextStyle(color: Color(0xFF00FFF4),fontSize:12.sp,fontWeight: FontWeight.w500),),
|
||||||
|
),
|
||||||
|
onPressed: () {},
|
||||||
),
|
),
|
||||||
onPressed: () {},
|
|
||||||
),
|
|
||||||
userAvatarBuilder: (BuildContext context, V2TimMessage message) {
|
userAvatarBuilder: (BuildContext context, V2TimMessage message) {
|
||||||
return avatarWidget(message.faceUrl ?? 'http://qiniuyun.ikuayou.com/avatar/default/default_header.png');
|
return avatarWidget(message.faceUrl ?? 'http://qiniuyun.ikuayou.com/avatar/default/default_header.png');
|
||||||
},
|
},
|
||||||
|
|||||||
@ -1119,7 +1119,7 @@ class _InfoListViewState extends State<InfoListView> with AutomaticKeepAliveClie
|
|||||||
}
|
}
|
||||||
|
|
||||||
void _showOutCircleDialog(
|
void _showOutCircleDialog(
|
||||||
BuildContext context, CircleLogic controller, Circle bean) {
|
BuildContext context, var controller, Circle bean) {
|
||||||
showDialog(
|
showDialog(
|
||||||
context: context,
|
context: context,
|
||||||
builder: (BuildContext context) {
|
builder: (BuildContext context) {
|
||||||
|
|||||||
@ -17,6 +17,7 @@ class Sys_notify_listLogic extends GetxController {
|
|||||||
int page = 0;
|
int page = 0;
|
||||||
int isVip = 0;
|
int isVip = 0;
|
||||||
bool isLoad = true;
|
bool isLoad = true;
|
||||||
|
bool isMore = true;
|
||||||
List<Lists> lists = [];
|
List<Lists> lists = [];
|
||||||
|
|
||||||
@override
|
@override
|
||||||
@ -49,6 +50,9 @@ class Sys_notify_listLogic extends GetxController {
|
|||||||
lists.add(Lists.fromJson(element));
|
lists.add(Lists.fromJson(element));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
if (bean.length < 10) {
|
||||||
|
isMore = false;
|
||||||
|
}
|
||||||
isLoad = false;
|
isLoad = false;
|
||||||
update();
|
update();
|
||||||
if (page == 0) {
|
if (page == 0) {
|
||||||
@ -65,8 +69,13 @@ class Sys_notify_listLogic extends GetxController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void onLoading() {
|
void onLoading() {
|
||||||
|
if (isMore) {
|
||||||
|
initList();
|
||||||
|
} else {
|
||||||
|
refreshController.loadNoData();
|
||||||
|
}
|
||||||
// page = page + 1;
|
// page = page + 1;
|
||||||
initList();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void makeRead() async {
|
void makeRead() async {
|
||||||
|
|||||||
@ -1,5 +1,8 @@
|
|||||||
|
import 'dart:convert';
|
||||||
|
|
||||||
import 'package:cached_network_image/cached_network_image.dart';
|
import 'package:cached_network_image/cached_network_image.dart';
|
||||||
import 'package:circle_app/components/my_app_bar.dart';
|
import 'package:circle_app/components/my_app_bar.dart';
|
||||||
|
import 'package:circle_app/router/app_routers.dart';
|
||||||
import 'package:circle_app/util/util.dart';
|
import 'package:circle_app/util/util.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';
|
||||||
@ -35,22 +38,22 @@ class Sys_notify_listPage extends StatelessWidget {
|
|||||||
child: logic.isLoad
|
child: logic.isLoad
|
||||||
? loaddingWidget(true)
|
? loaddingWidget(true)
|
||||||
: logic.lists.isEmpty
|
: logic.lists.isEmpty
|
||||||
? noResultWidget()
|
? noResultWidget()
|
||||||
: SmartRefresher(
|
: SmartRefresher(
|
||||||
controller: logic.refreshController,
|
controller: logic.refreshController,
|
||||||
enablePullUp: true,
|
enablePullUp: true,
|
||||||
onRefresh: logic.onRefresh,
|
onRefresh: logic.onRefresh,
|
||||||
onLoading: () {
|
onLoading: () {
|
||||||
logic.onLoading();
|
logic.onLoading();
|
||||||
},
|
},
|
||||||
child: ListView.builder(
|
child: ListView.builder(
|
||||||
padding: EdgeInsets.all(10.sp),
|
padding: EdgeInsets.all(10.sp),
|
||||||
itemCount: logic.lists.length,
|
itemCount: logic.lists.length,
|
||||||
itemBuilder: (context, index) {
|
itemBuilder: (context, index) {
|
||||||
return ListItem(logic.lists[index]);
|
return ListItem(logic.lists[index]);
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@ -70,23 +73,24 @@ class Sys_notify_listPage extends StatelessWidget {
|
|||||||
));
|
));
|
||||||
}
|
}
|
||||||
if (data.title?.isNotEmpty ?? false) {
|
if (data.title?.isNotEmpty ?? false) {
|
||||||
widgets.add(Container(
|
widgets.add(
|
||||||
margin: EdgeInsets.only(
|
Container(
|
||||||
top: 8.sp, left: 16.sp, right: 16.sp),
|
margin: EdgeInsets.only(top: 8.sp, left: 16.sp, right: 16.sp),
|
||||||
child: Text(
|
child: Text(
|
||||||
data.title!,
|
data.title!,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: Color(0xFFF7FAFA),
|
color: Color(0xFFF7FAFA),
|
||||||
fontSize: 14.sp,
|
fontSize: 14.sp,
|
||||||
fontWeight: FontWeight.w500),
|
fontWeight: FontWeight.w500),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (data.content?.isNotEmpty ?? false) {
|
if (data.content?.isNotEmpty ?? false) {
|
||||||
widgets.add(Container(
|
widgets.add(Container(
|
||||||
margin: EdgeInsets.only(
|
margin: EdgeInsets.only(
|
||||||
top: 10.sp, left: 16.sp, right: 16.sp,bottom: 10.sp),
|
top: 10.sp, left: 16.sp, right: 16.sp, bottom: 10.sp),
|
||||||
child: Text(
|
child: Text(
|
||||||
data.content!,
|
data.content!,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
@ -97,6 +101,21 @@ class Sys_notify_listPage extends StatelessWidget {
|
|||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
widgets.add(GestureDetector(
|
||||||
|
onTap: () {
|
||||||
|
Get.toNamed(AppRoutes.WebViewActivity,
|
||||||
|
arguments: jsonDecode(data.note!));
|
||||||
|
},
|
||||||
|
child: Container(
|
||||||
|
margin: EdgeInsets.only(bottom: 8.sp, left: 16.sp),
|
||||||
|
child: Text('点击查看>',
|
||||||
|
style: TextStyle(
|
||||||
|
color: Color(0xFF00FFF4),
|
||||||
|
fontSize: 12.sp,
|
||||||
|
fontWeight: FontWeight.w500)),
|
||||||
|
),
|
||||||
|
));
|
||||||
|
|
||||||
return Container(
|
return Container(
|
||||||
child: Column(
|
child: Column(
|
||||||
children: [
|
children: [
|
||||||
@ -127,14 +146,13 @@ class Sys_notify_listPage extends StatelessWidget {
|
|||||||
borderRadius: BorderRadius.circular(10.sp),
|
borderRadius: BorderRadius.circular(10.sp),
|
||||||
color: Color(0xFF292836)),
|
color: Color(0xFF292836)),
|
||||||
child: Column(
|
child: Column(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children:widgets
|
children: widgets),
|
||||||
),
|
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
)
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|||||||
@ -5,6 +5,6 @@ import 'state.dart';
|
|||||||
class WebviewLogic extends GetxController {
|
class WebviewLogic extends GetxController {
|
||||||
final WebviewState state = WebviewState();
|
final WebviewState state = WebviewState();
|
||||||
|
|
||||||
final title = Get.arguments['title'];
|
final title = Get.arguments['title'] ?? '';
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user