Flutter BottomNavigationBar中心图标样式 [英] Flutter BottomNavigationBar center icon style

查看:59
本文介绍了Flutter BottomNavigationBar中心图标样式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以在 BottomNavigationBar 中的中心图标上方添加一个缺口?这张图片中的内容:

Is there a way to add a notch above the center icon in BottomNavigationBar? Something like in this image:

我目前有类似这样的东西来生成导航:

I currently have something like this generating the navigation:

        return BottomNavigationBar(
          type: BottomNavigationBarType.fixed,
          fixedColor: Color(0xff2398C3),
          showSelectedLabels: false,
          showUnselectedLabels: false,
          currentIndex: snapshot.data.index,
          onTap: _bottomNavBarBloc.pickItem,
          items: [
            BottomNavigationBarItem(
              title: Text('Search'),
              icon: Icon(Icons.search),
            ),
            BottomNavigationBarItem(
              title: Text('Browse'),
              icon: Icon(Icons.view_list),
            ),
            BottomNavigationBarItem(
              title: Text('Icon'),
              icon: Container(
                child: FlutterLogo(
                  size: 35.0,
                ),
              ),
            ),
            BottomNavigationBarItem(
              title: Text('Favorites'),
              icon: Icon(Icons.bookmark),
            ),
            BottomNavigationBarItem(
              title: Text('Settings'),
              icon: Icon(Icons.settings),
            ),
          ],
        );

推荐答案

您应该在lib以下使用. convex_bottom_bar

You should be use below lib. convex_bottom_bar

这篇关于Flutter BottomNavigationBar中心图标样式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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