如需转载,请注明出处:Flutter学习笔记(39)--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),
          ],

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

加上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,

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

 

相关文章:

  • 2021-10-17
  • 2021-08-17
  • 2021-12-10
  • 2021-04-19
  • 2021-09-25
  • 2021-12-24
  • 2021-08-31
猜你喜欢
  • 2021-12-01
  • 2021-05-14
  • 2021-10-25
  • 2021-04-26
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案