From cedd0b083aa7abcd184941c19ad17d6b93381642 Mon Sep 17 00:00:00 2001 From: LittleSheep Date: Thu, 5 Sep 2024 20:28:22 +0800 Subject: [PATCH] :bug: Fix overflow in dashboard --- lib/screens/dashboard.dart | 38 +++++++++++++++++++++++++------------- 1 file changed, 25 insertions(+), 13 deletions(-) diff --git a/lib/screens/dashboard.dart b/lib/screens/dashboard.dart index 37d5844..3816053 100644 --- a/lib/screens/dashboard.dart +++ b/lib/screens/dashboard.dart @@ -258,8 +258,18 @@ class _DashboardScreenState extends State { subtitle: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - if (x.subtitle != null) Text(x.subtitle!), - Text(x.body), + if (x.subtitle != null) + Text( + x.subtitle!, + maxLines: 1, + overflow: TextOverflow.ellipsis, + ) + else + Text( + x.body, + maxLines: 1, + overflow: TextOverflow.ellipsis, + ), ], ), ), @@ -326,17 +336,19 @@ class _DashboardScreenState extends State { return SizedBox( width: min(480, width), child: Card( - child: PostListEntryWidget( - item: item, - isClickable: true, - isShowEmbed: true, - isNestedClickable: true, - onUpdate: (_) { - _pullPosts(); - }, - backgroundColor: Theme.of(context) - .colorScheme - .surfaceContainerLow, + child: SingleChildScrollView( + child: PostListEntryWidget( + item: item, + isClickable: true, + isShowEmbed: true, + isNestedClickable: true, + onUpdate: (_) { + _pullPosts(); + }, + backgroundColor: Theme.of(context) + .colorScheme + .surfaceContainerLow, + ), ), ).paddingSymmetric(horizontal: 8), );