问题描述
我的问题是我的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,...