首页 > 解决方案 > 在底部导航栏上添加行

问题描述

图片

我想在底部导航栏上添加这种类型的线我想要this type of blue lines when navigate or tap to another tab

这是我的代码

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

请帮助找出这个

标签: flutterflutter-layoutbottomnavigationview

解决方案


这个包应该可以帮助你实现这一点。您可能只需要根据需要对其进行自定义。

在此处输入图像描述


推荐阅读