其他分享
首页 > 其他分享> > Flutter学习笔记(39)--BottomNavigationBar底部item超过3个只显示icon,不显示title

Flutter学习笔记(39)--BottomNavigationBar底部item超过3个只显示icon,不显示title

作者:互联网

如需转载,请注明出处: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,

 

标签:normal,39,title,selected,Ids,mine,bottomItem,ic,BottomNavigationBar
来源: https://www.cnblogs.com/upwgh/p/13229388.html