您现在的位置是:首页 >学无止境 >flutter修改bottomnavigationbar高度网站首页学无止境
flutter修改bottomnavigationbar高度
bottomNavigationBar: SizedBox(height: 65, child:BottomNavigationBar(
type: BottomNavigationBarType.fixed,
currentIndex: currentIndex,
selectedFontSize: 0.0,
unselectedFontSize: 0.0,
onTap: (int index) {
setState(() {
currentIndex = index;
controller.animateToPage(currentIndex, duration: Duration(milliseconds: 100), curve: Curves.easeInOut);
});
},
items: [
BottomNavigationBarItem(
icon: Image.asset("images/tab_icon1_d.png", width: 30,),
activeIcon: Image.asset("images/tab_icon1_s.png", width: 30),
label: "",
),
BottomNavigationBarItem(
icon: Image.asset("images/tab_icon2_d.png", width: 30),
activeIcon: Image.asset("images/tab_icon2_s.png", width: 30),
label: "",
),
BottomNavigationBarItem(
icon: Image.asset("images/tab_icon3_d.png", width: 30),
activeIcon: Image.asset("images/tab_icon3_s.png", width: 30),
label: "",
),
],
)),