如何解决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,...
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。