Flutter TextOverflow란?

Posted by negabaro kim on Friday, April 16, 2021 Tags: flutter/widgets   1 minute read

TextOverflow.ellipsis

ellipsis라는 뜻처럼 지정된 사이즈에 넘어갈때 글자 뒤에 ...을 붙여 생략해준다.

Text(
  "This is a long text",
  overflow: TextOverflow.ellipsis,
),

image

TextOverflow.fade

Text(
  "This is a long text",
  overflow: TextOverflow.fade,
  maxLines: 1,
  softWrap: false,
),

image

TextOverflow.clip

Text(
  "This is a long text",
  overflow: TextOverflow.clip,
  maxLines: 1,
  softWrap: false,
),

image