Flutter BottomNavigationBar在顶部发光吗?

问题描述

我的问题是我的BottomNavigationBar周围有光。当我将BottomNavigationBar调暗时,我第一次看到了。希望有人可以提供帮助。

这是代码:

BottomNavigationBar(
        currentIndex: selectedIndex,unselectedItemColor: Colors.white,backgroundColor: Colors.black12,selectedItemColor: ASAP.info,showSelectedLabels: false,showUnselectedLabels: false,type: BottomNavigationBarType.fixed,onTap: (int i) {
          if (i == 2) {
            showSearch(context: context,delegate: SalonSearch());
            return;
          }

          setState(() {
            selectedIndex = i;
          });
        },iconSize: 30,items: [
          BottomNavigationBarItem(
            icon: const Icon(MdiIcons.mapMarkerRadiusOutline),title: Text(
              "Locations",style: TextStyle(color: Colors.red,decorationColor: Colors.red),),BottomNavigationBarItem(
            icon: const Icon(MdiIcons.heartOutline),title: Text("Favourites"),BottomNavigationBarItem(
            icon: const Icon(
              MdiIcons.magnify,title: Text("Search"),],)

问候 卡尔文

解决方法

elevation中的BottomNavigationBar设置为0,以消除这种影响:

BottomNavigationBar(
        currentIndex: selectedIndex,unselectedItemColor: Colors.white,backgroundColor: Colors.black12,selectedItemColor: ASAP.info,showSelectedLabels: false,showUnselectedLabels: false,type: BottomNavigationBarType.fixed,elevation: 0,...

相关问答

依赖报错 idea导入项目后依赖报错,解决方案:https://blog....
错误1:代码生成器依赖和mybatis依赖冲突 启动项目时报错如下...
错误1:gradle项目控制台输出为乱码 # 解决方案:https://bl...
错误还原:在查询的过程中,传入的workType为0时,该条件不起...
报错如下,gcc版本太低 ^ server.c:5346:31: 错误:‘struct...