当BottomNavigationBarItem超过 3 个时,BottomNavigationBar不应用背景图像。它显示白色背景而不是应用的图像。请查看代码,如果我在代码中遗漏了什么,请告诉我。
bottomNavigationBar: Container(
decoration: BoxDecoration(
image: DecorationImage(image: AssetImage('assets/images/tabbar_background.png'), fit: BoxFit.fill),
),
child: BottomNavigationBar(
backgroundColor: Colors.transparent,
elevation: 0,
items: [
BottomNavigationBarItem(icon: Image.asset("assets/images/eplay.png"), title: Text('title')),
BottomNavigationBarItem(icon: Image.asset("assets/images/games.png"), title: Text('title')),
BottomNavigationBarItem(icon: Image.asset("assets/images/retail-location.png"), title: Text('title')),
BottomNavigationBarItem(icon: Image.asset("assets/images/scan.png"), title: Text('title')),
/* BottomNavigationBarItem(icon: Image.asset("assets/images/scan.png"), title: Text('title')),
*/
],
),