消息列表换行优化

This commit is contained in:
sky.min 2026-01-07 14:56:46 +08:00
parent 361a4c441e
commit 5eca523bd1

View File

@ -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(