flutter limit text length code example
Example: flutter limit string length rich text
....
....
Flexible(
child: RichText(
overflow: TextOverflow.ellipsis, // this will help add dots after maxLines
maxLines: 2, // max lines after that dots comes
strutStyle: StrutStyle(fontSize: 12.0),
text: TextSpan(
style: TextStyle(color: Colors.black),
text: 'A very long text :)'
),
),
),
.....
.....