From d21bbbe066c24e9d6e619b42d9622c4572235af9 Mon Sep 17 00:00:00 2001 From: ryg-git Date: Sat, 6 Feb 2021 22:53:49 +0530 Subject: [PATCH] applied requested changes in the review --- lib/widgets/post.dart | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/widgets/post.dart b/lib/widgets/post.dart index 86b2856..27cb8b2 100644 --- a/lib/widgets/post.dart +++ b/lib/widgets/post.dart @@ -433,12 +433,12 @@ class PostWidget extends HookWidget { ); final tp = TextPainter( text: span, - maxLines: 20, + maxLines: 10, textDirection: Directionality.of(context), )..layout(maxWidth: constraints.maxWidth - 20); if (tp.didExceedMaxLines) { - return Container( + return ConstrainedBox( constraints: BoxConstraints(maxHeight: tp.height), child: Stack( alignment: Alignment.bottomCenter, @@ -454,13 +454,13 @@ class PostWidget extends HookWidget { ), ), Container( - height: tp.preferredLineHeight * 4, + height: tp.preferredLineHeight * 2.5, decoration: BoxDecoration( gradient: LinearGradient( begin: Alignment.topCenter, end: Alignment.bottomCenter, colors: [ - theme.cardColor.withAlpha(128), + theme.cardColor.withAlpha(0), theme.cardColor, ], ),