maxLines property
An optional maximum number of lines for the text to span, wrapping if necessary.
If the text exceeds the given number of lines, it will be truncated according to isEllipsis.
If this is 1, the text will not wrap. Otherwise, text will wrap at the edge of the box.
If this is null, but there is an ambient DefaultTextStyle that specifies an explicit number for its DefaultTextStyle.maxLines, then the DefaultTextStyle value will take precedence. You can use a RichText widget directly to entirely override the DefaultTextStyle.
Implementation
final int? maxLines;