在底部导航栏上添加行

问题描述 投票:0回答:2

Image

我想在我想要this type of blue lines when navigate or tap to another tab的flutter中的bottomNavigation栏上添加这种类型的线>

这是我的代码

BottomNavigationBar(   //Bottom navigation bar 
      onTap: onTabTapped,
      showSelectedLabels: true,
      currentIndex: _currentIndex,
      items: [
        BottomNavigationBarItem(    //Items of BottomNavigation Bar 
          icon: Image.asset(
            unSelectedTabs[0],
            width: iconSize,
            height: iconSize,
          ),
          title:
              Text("Home", style: TextStyle(color: _currentIndex == 0 ? AppTheme.mainThemeColor() : AppTheme.hintTextColor())),
          activeIcon: Image.asset(
            selectedTabs[0],
            width: iconSize,
            height: iconSize,
          ),
        ),

       .........
other childItem

[请帮助查找此内容

我想在flutter中的bottomNavigation栏上添加这种类型的线,当我导航或点击到另一个选项卡时,我想要这种类型的蓝线,这是我的代码BottomNavigationBar(//底部导航栏...

flutter flutter-layout bottomnavigationview
2个回答
0
投票

This包应该可以帮助您实现。您可能只需要根据需要自定义它。


0
投票

您可以使用标签栏代替BottomNavigationBar这是一个示例

© www.soinside.com 2019 - 2024. All rights reserved.