简体   繁体   English

凝聚flutter底部导航栏小部件的差距

[英]condensing the gap between flutter bottom navigation bar widget

I have been trying to make the flutter bottom navigation bar widget to condense the gap between icons.我一直在尝试制作 flutter 底部导航栏小部件来压缩图标之间的间隙。

在此处输入图像描述

How would I be able to do this.我怎么能做到这一点。 I am imagining that I would need to create my own bottom navigation bar but if there is a simpler solution then I am all ears.我想象我需要创建自己的底部导航栏,但如果有更简单的解决方案,那么我会全神贯注。

Thank you.谢谢你。

Okay seems like I was being silly.好吧,看来我是傻了。

You can add padding to a specific side to get it moving like so:您可以将填充添加到特定的一侧以使其移动,如下所示:

BottomNavigationBarItem(
  icon: Container(
    child: Icon(Icons.explore),
      padding: EdgeInsets.fromLTRB(100, 0, 0, 0),
    ),
  title: Text("Explore"),
),

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM