fluttertext省略号
修改源码:
case TextOverflow.ellipsis:
assert(textDirection != null);
_needsClipping = true;
final TextPainter fadeSizePainter = TextPainter(
text: TextSpan(style: _style, text: '\u2026'),
textDirection: textDirection,
textScaleFactor: textScaleFactor,
textstyle
locale: locale,
)..layout();
if (!didOverflowWidth){
final double fadeEnd = size.height;
final int lines = fadeEnd~/fadeSizePainter.height;
_textPainter.maxLines = lines;
}
_overflowShader = null;
break;

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。