移除顶部和底部ListTile颤动的空间 [英] Remove space top and bottom ListTile flutter

查看:70
本文介绍了移除顶部和底部ListTile颤动的空间的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

请给我帮助. 如何从ListTile删除顶部和底部的空间?

I need help, please. How to remove the space top and bottom from ListTile?

我的代码是:

             child: Column(
                children: <Widget>[
                  ListTile(
                    contentPadding: EdgeInsets.only(left: 0.0, right: 0.0),
                    title: Text(
                      'Home',
                      style: TextStyle(fontSize: 15.0),
                    ),
                  ),
                  ListTile(
                    contentPadding: EdgeInsets.only(left: 0.0, right: 0.0),
                    title: Text(
                      'Audio',
                      style:
                          TextStyle(fontSize: 15.0, color: Colors.black45),
                    ),
                  ),),

屏幕截图

谢谢!.对不起,我的英语不好

Thanks!. Sorry for my bad English

推荐答案

使用ListTile是不可能的.借助ListTileTheme可以进行一些修改,例如颜色,还可以修改填充,但仅适用于左和右填充.更好的方法是创建自己的自定义图块,如@santosh在他的答案中所示. 您还可以使用SizedBox,但它可能导致悲惨的输出.

With ListTile it is not possible. Some modifications are possible with the help of ListTileTheme like color and there is also the option of modifying padding but only work for left and right padding. So better is to create your own custom tile as @santosh showed in his answer. You can also use SizedBox but it can result in tragic output.

这篇关于移除顶部和底部ListTile颤动的空间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆