消息列表换行优化

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, width: 1.sw,
margin: EdgeInsets.only(left: 20.w, right: 20.w, top: 20.h, bottom: 20.h), margin: EdgeInsets.only(left: 20.w, right: 20.w, top: 20.h, bottom: 20.h),
child: Column( child: Column(
mainAxisAlignment: MainAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[ children: <Widget>[
Wrap( RichText(text: TextSpan( children: [
children: <Widget>[
// //
Container( TextSpan(text: '${DateTool().dateToHnString(messageItemEntity.createdAt!.toString())} | ',
margin: EdgeInsets.only(top: 4.h), style: TextStyle(fontSize: 22.sp, color: messageItemEntity.readAt! == 0
child: Text( ? AppColors.blackColor: AppColors.placeholderTextColor)),
DateTool().dateToHnString(messageItemEntity.createdAt!.toString()), //
style: TextStyle( TextSpan(text: '${messageItemEntity.data!}', style: TextStyle(fontSize: 22.sp, color: messageItemEntity.readAt! == 0
fontSize: 20.sp, ? AppColors.blackColor : AppColors.placeholderTextColor))])
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,)
],
), ),
]))))), 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) if (_showCheckboxes.value)
Checkbox( Checkbox(