我一直在寻找一种方法来更改我的 List Tile Widget 的文本大小,
最佳答案
您必须通过 TextStyle
作为 Text 小部件的参数。这是示例。
ListTile(
leading: FlutterLogo(size: 72.0),
title: Text('Three-line ListTile'),
subtitle: Text(
'A sufficiently long subtitle warrants three lines.',
style: TextStyle(
fontSize: 20.0,
color: Colors.red,
fontWeight: FontWeight.w600,
),
),
trailing: Icon(Icons.more_vert),
isThreeLine: true,
),
您可以从 TextStyle 更改多种样式的 Text 小部件,例如 fontWeigth
, textBaseLine
, letterSpacing
等等
关于android - 如何更改 List Tile Widget 的文本大小?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/62443199/