[英]Align ListTile Icon to Left
Is there a way to align an icon before the title using a ListTile?有没有办法使用 ListTile 在标题之前对齐图标? I know that trailing aligns the icon after the title.
我知道尾随对齐标题后的图标。 Is there a reverse way?
有反向方法吗?
leading
property is what you are looking for: leading
财产是你要找的:
ListTile(
leading: Icon(Icons.access_alarm),
...
)
Refer to this documentation ListTile-leading 请参阅此文档ListTile-leading
leading
and trailing
properties can be used on both sides. leading
和trailing
属性可以在两侧使用。
ListTile(
leading: Icon(Icons.exit_to_app_outlined), // for Right
trailing: Icon(Icons.exit_to_app_outlined) // for Left
)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.