🐛 Fix overflow in dashboard

This commit is contained in:
LittleSheep 2024-09-05 20:28:22 +08:00
parent 1a0721ba3a
commit cedd0b083a

View File

@ -258,8 +258,18 @@ class _DashboardScreenState extends State<DashboardScreen> {
subtitle: Column( subtitle: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
if (x.subtitle != null) Text(x.subtitle!), if (x.subtitle != null)
Text(x.body), Text(
x.subtitle!,
maxLines: 1,
overflow: TextOverflow.ellipsis,
)
else
Text(
x.body,
maxLines: 1,
overflow: TextOverflow.ellipsis,
),
], ],
), ),
), ),
@ -326,6 +336,7 @@ class _DashboardScreenState extends State<DashboardScreen> {
return SizedBox( return SizedBox(
width: min(480, width), width: min(480, width),
child: Card( child: Card(
child: SingleChildScrollView(
child: PostListEntryWidget( child: PostListEntryWidget(
item: item, item: item,
isClickable: true, isClickable: true,
@ -338,6 +349,7 @@ class _DashboardScreenState extends State<DashboardScreen> {
.colorScheme .colorScheme
.surfaceContainerLow, .surfaceContainerLow,
), ),
),
).paddingSymmetric(horizontal: 8), ).paddingSymmetric(horizontal: 8),
); );
}, },