truncate method

TextBuilder truncate()

truncate: overflow: hidden; text-overflow: ellipsis; white-space: nowrap; ✅ 支持:通过 TextOverflow.ellipsis 实现

Implementation

TextBuilder truncate() {
  _overflow = TextOverflow.ellipsis;
  _maxLines = 1; // 单行显示以配合截断
  return this;
}