如需转载,请注明出处:Flutter学习笔记(16)--BottomNavigationBar底部item超过3个只显示icon,不显示title
items: [ _bottomItem(Ids.home, 'ic_home_normal', 'ic_home_selected', 0), _bottomItem(Ids.information, 'ic_discovery_normal', 'ic_discovery_selected', 1), _bottomItem(Ids.news, 'ic_hot_normal', 'ic_hot_selected', 2), _bottomItem(Ids.mine, 'ic_mine_normal', 'ic_mine_selected', 3), ],
加上type: BottomNavigationBarType.fixed,即可
items: [ _bottomItem(Ids.home, 'ic_home_normal', 'ic_home_selected', 0), _bottomItem(Ids.information, 'ic_discovery_normal', 'ic_discovery_selected', 1), _bottomItem(Ids.news, 'ic_hot_normal', 'ic_hot_selected', 2), _bottomItem(Ids.mine, 'ic_mine_normal', 'ic_mine_selected', 3), ], type: BottomNavigationBarType.fixed,