ellipsis property

String? ellipsis

The string used to ellipsize overflowing text. Setting this to a non-empty string will cause this string to be substituted for the remaining text if the text can not fit within the specified maximum height.

Specifically, the ellipsis is applied to the last line before the line truncated by maxLines, if maxLines is non-null and that line overflows the height constraint, or to the first line that is taller than the height constraint, if maxLines is null. The height constraint is the maxHeight passed to layout.

After this is set, you must call layout before the next call to paint.

The higher layers of the system, such as the MongolText widget, represent overflow effects using the TextOverflow enum. The TextOverflow.ellipsis value corresponds to setting this property to U+2026 HORIZONTAL ELLIPSIS (…).

Implementation

String? get ellipsis => _ellipsis;
void ellipsis=(String? value)

Implementation

set ellipsis(String? value) {
  assert(value == null || value.isNotEmpty);
  if (_ellipsis == value) {
    return;
  }
  _ellipsis = value;
  markNeedsLayout();
}