很多时候我们使用Text是在Row或者Colunms中,这个时候单单是设置overflow没用的,需要使用Flex和Expanded,如:
Flex(
direction: Axis.horizontal,
children: <Widget>[
Text("juejin:"),
Expanded(
child: Text.rich(TextSpan(children: [
TextSpan(
text:
"https://juejin.im/user/594a1ed161ff4b006c10e807/posts",
recognizer: tap,
style: TextStyle(
color: Colors.red,
decoration: TextDecoration.underline,
fontWeight: FontWeight.bold)),
]),textScaleFactor: 0.8,)),
],
)
因篇幅问题不能全部显示,请点此查看更多更全内容
Copyright © 2019- oldu.cn 版权所有 浙ICP备2024123271号-1
违法及侵权请联系:TEL:199 1889 7713 E-MAIL:2724546146@qq.com
本站由北京市万商天勤律师事务所王兴未律师提供法律服务