Flutter BottomNavigationBar 在顶部发光?
Flutter BottomNavigationBar Glow on top?
我有一个问题,我的 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"),
),
],
)
您好
卡尔文
将 BottomNavigationBar
的 elevation
设置为 0 以消除该效果:
BottomNavigationBar(
currentIndex: selectedIndex,
unselectedItemColor: Colors.white,
backgroundColor: Colors.black12,
selectedItemColor: ASAP.info,
showSelectedLabels: false,
showUnselectedLabels: false,
type: BottomNavigationBarType.fixed,
elevation: 0,
...
我有一个问题,我的 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"),
),
],
)
您好 卡尔文
将 BottomNavigationBar
的 elevation
设置为 0 以消除该效果:
BottomNavigationBar(
currentIndex: selectedIndex,
unselectedItemColor: Colors.white,
backgroundColor: Colors.black12,
selectedItemColor: ASAP.info,
showSelectedLabels: false,
showUnselectedLabels: false,
type: BottomNavigationBarType.fixed,
elevation: 0,
...