maxLine method

Text maxLine([
  1. int? maxLines
])

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 overflow. If this is 1, text will not wrap. Otherwise, text will be wrapped at the edge of the box.

Implementation

Text maxLine([int? maxLines]) => _copyWith(maxLines: maxLines ?? 1);