applied requested changes in the review
This commit is contained in:
parent
b9ddb23d23
commit
d21bbbe066
|
@ -433,12 +433,12 @@ class PostWidget extends HookWidget {
|
||||||
);
|
);
|
||||||
final tp = TextPainter(
|
final tp = TextPainter(
|
||||||
text: span,
|
text: span,
|
||||||
maxLines: 20,
|
maxLines: 10,
|
||||||
textDirection: Directionality.of(context),
|
textDirection: Directionality.of(context),
|
||||||
)..layout(maxWidth: constraints.maxWidth - 20);
|
)..layout(maxWidth: constraints.maxWidth - 20);
|
||||||
|
|
||||||
if (tp.didExceedMaxLines) {
|
if (tp.didExceedMaxLines) {
|
||||||
return Container(
|
return ConstrainedBox(
|
||||||
constraints: BoxConstraints(maxHeight: tp.height),
|
constraints: BoxConstraints(maxHeight: tp.height),
|
||||||
child: Stack(
|
child: Stack(
|
||||||
alignment: Alignment.bottomCenter,
|
alignment: Alignment.bottomCenter,
|
||||||
|
@ -454,13 +454,13 @@ class PostWidget extends HookWidget {
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Container(
|
Container(
|
||||||
height: tp.preferredLineHeight * 4,
|
height: tp.preferredLineHeight * 2.5,
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
gradient: LinearGradient(
|
gradient: LinearGradient(
|
||||||
begin: Alignment.topCenter,
|
begin: Alignment.topCenter,
|
||||||
end: Alignment.bottomCenter,
|
end: Alignment.bottomCenter,
|
||||||
colors: [
|
colors: [
|
||||||
theme.cardColor.withAlpha(128),
|
theme.cardColor.withAlpha(0),
|
||||||
theme.cardColor,
|
theme.cardColor,
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
|
Loading…
Reference in New Issue