消息列表换行优化
This commit is contained in:
parent
361a4c441e
commit
5eca523bd1
@ -354,51 +354,22 @@ class _MessageListPageState extends State<MessageListPage>
|
||||
width: 1.sw,
|
||||
margin: EdgeInsets.only(left: 20.w, right: 20.w, top: 20.h, bottom: 20.h),
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: <Widget>[
|
||||
Wrap(
|
||||
children: <Widget>[
|
||||
RichText(text: TextSpan( children: [
|
||||
// 时间
|
||||
Container(
|
||||
margin: EdgeInsets.only(top: 4.h),
|
||||
child: Text(
|
||||
DateTool().dateToHnString(messageItemEntity.createdAt!.toString()),
|
||||
style: TextStyle(
|
||||
fontSize: 20.sp,
|
||||
color: messageItemEntity.readAt! == 0
|
||||
? AppColors.blackColor
|
||||
: AppColors.placeholderTextColor,
|
||||
),
|
||||
),
|
||||
),
|
||||
// 竖线
|
||||
Container(
|
||||
width: 1,
|
||||
height: 10,
|
||||
margin: EdgeInsets.only(left: 5.w, right: 5.w, top: 10.h),
|
||||
color: messageItemEntity.readAt! == 0
|
||||
? AppColors.blackColor
|
||||
: AppColors.placeholderTextColor,
|
||||
),
|
||||
// 标题
|
||||
Container(
|
||||
margin: EdgeInsets.only(top: 2.h),
|
||||
child: Text('${messageItemEntity.data!}',
|
||||
maxLines: 2,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
style: TextStyle(
|
||||
fontSize: 20.sp,
|
||||
color: messageItemEntity.readAt! == 0
|
||||
? AppColors.blackColor
|
||||
: AppColors.placeholderTextColor,
|
||||
),
|
||||
)),
|
||||
Container(margin: EdgeInsets.only(top: 10.h), child: GestureDetector(
|
||||
child: Text('点击查看', style: TextStyle(fontWeight: FontWeight.w500, fontSize: 20.sp, color: AppColors.mainColor),),
|
||||
),alignment: Alignment.centerRight,)
|
||||
],
|
||||
TextSpan(text: '${DateTool().dateToHnString(messageItemEntity.createdAt!.toString())} | ',
|
||||
style: TextStyle(fontSize: 22.sp, color: messageItemEntity.readAt! == 0
|
||||
? AppColors.blackColor: AppColors.placeholderTextColor)),
|
||||
// 消息
|
||||
TextSpan(text: '${messageItemEntity.data!}', style: TextStyle(fontSize: 22.sp, color: messageItemEntity.readAt! == 0
|
||||
? AppColors.blackColor : AppColors.placeholderTextColor))])
|
||||
),
|
||||
]))))),
|
||||
Container(margin: EdgeInsets.only(top: 10.h), child: GestureDetector(
|
||||
child: Text('点击查看', style: TextStyle(fontWeight: FontWeight.w500, fontSize: 22.sp, color: AppColors.mainColor),),
|
||||
),alignment: Alignment.centerRight)],
|
||||
)))),
|
||||
),
|
||||
// 显示选中状态的复选框
|
||||
if (_showCheckboxes.value)
|
||||
Checkbox(
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user