Flutter - BottomNavigationBar more than three blank items

2

When I add more than 3 items in the component (BottomNavigationBar), it is leaving my items blank.

    
asked by anonymous 05.06.2018 / 14:43

1 answer

1

As @HansMuller replied in the post: link

  When more than 3 BottomNavigationBar items are provided the type, if unspecified, changes to BottomNavigationBarType.shifting

When we have more than 3 items in the BottomNavigationBar, if not specified, it changes the type to BottomNavigationBarType.shifting.

  When the BottomNavigationBar's type is BottomNavigationBarType.shifting the text and icons are rendered in white ...

When the BottomNavigationBar type is shifting the text items and icons are rendered blank ...

To solve this problem, just set the type to fixed .

new BottomNavigationBar(
  type: BottomNavigationBarType.fixed,
  items: [...],
);
    
05.06.2018 / 14:51