maxLines property
Maximum number of lines a text block (heading, paragraph, list item, or table cell) may occupy before being truncated.
When set, text that wraps beyond maxLines is truncated using overflow (defaults to TextOverflow.ellipsis when maxLines is set but overflow is not). Code blocks are never truncated.
Useful for card previews, list tiles, and chat bubbles that render markdown content within fixed-height containers.
Implementation
final int? maxLines;