We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fcf30ba commit 31bda5fCopy full SHA for 31bda5f
lib/ui/article_page.dart
@@ -106,10 +106,16 @@ class ArticlePage extends StatelessWidget {
106
Expanded(
107
child: Padding(
108
padding: EdgeInsets.all(10.0),
109
- child: Text(
110
- article.description,
111
- style: TextStyle(fontSize: 18.0, color: Colors.black54),
112
- ),
+ child: new LayoutBuilder(
+ builder: (BuildContext context, BoxConstraints constraints) {
+ print(constraints);
+ return new Text(
113
+ article.description,
114
+ overflow: TextOverflow.ellipsis,
115
+ style: TextStyle(fontSize: 18.0, color: Colors.black54),
116
+ maxLines: (constraints.maxHeight / 18.0).floor() - 1,
117
+ );
118
+ }),
119
),
120
121
Row(
0 commit comments