Closed shun007 closed 3 years ago
import 'package:extended_text/extended_text.dart'; import 'package:flutter/material.dart'; void main() => runApp(MyApp()); class MyApp extends StatelessWidget { @override Widget build(BuildContext context) { return MaterialApp( home: Container( width: 100, // 数字刚好溢出一个 child: ExtendedText("1234567891234", maxLines: 1, overflowWidget: TextOverflowWidget( position: TextOverflowPosition.start, // 如果把省略号换成空字符串就不会卡了 Text("") child: Text("..."), ))), ); } }
try 6.0.4