[英]How to adjust the spacing between items inside a Flutter ListView Widget
visualDensity: VisualDensity.compact,
is helping a little to decrease the padding between the ListItems in the row有助于减少行中 ListItems 之间的填充
width: MediaQuery.of(context).size.width
This will help you to solve your error.这将帮助您解决错误。 This is happening cause the subtitle is overflowing the container width.发生这种情况是因为字幕溢出了容器宽度。 So make the container width the line I above mention.因此,将容器宽度设为我上面提到的线。
Try to use Flexible Widget in your ListView items尝试在您的 ListView 项目中使用灵活的小部件
there is a new property added to the ListTile, which is doing the job: ListTile 中添加了一个新属性,它正在完成这项工作:
horizontalTitleGap: value(double),
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.