Show paragraph with ellipsis in Flutter
overflow in addition to
maxlines. if you need to adhere to a really tight fixed height then you can easily calculate what maxlines should be based upon your font size.
Text( 'my super long string', textAlign: TextAlign.left, overflow: TextOverflow.ellipsis, maxLines: 3, ),
Jithesh Kt about 1 month
I know how to use ellipsis with the Text widget.
overflow: TextOverflow.ellipsisdoes the job very well. But my problem is it actually displays only one line. I am trying to make a layout something similar to the below image:
How to do this in Flutter?
It is a common layout and it is sad that it isn't documented anywhere :(
Jithesh Kt about 4 yearsThanks. But little bit confused, can you edit the answer and post a small snippet showing Text widget displaying two lines?
Jithesh Kt about 4 yearsThanks, blaneyneil, much appreciated :)
Delicia Fernandes about 2 yearsWrap the Text widget with Expanded if it doesn't work.