Flutter - Bottomnavigationbar more than three blank items

Asked

Viewed 168 times

2

When I add more than 3 items to the component (Bottomnavigationbar), this leaves my items blank.

print1

print2

  • 1

    post more informs about your type question, snippets of code, error messages, etc...

  • 1

    Thanks Stephen, next I put more information :)

1 answer

1


How @Hansmuller responded in the post: https://github.com/flutter/flutter/issues/13642

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

When we have more than 3 items in Bottomnavigationbar, if unspecified, it changes the type to Bottomnavigationbartype.shifting.

When the Bottomnavigationbar’s type is Bottomnavigationbartype.shifting the items text and icons are rendered in white...

When the Bottomnavigationbar guy is shifting text items and icons are rendered blank...

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

new BottomNavigationBar(
  type: BottomNavigationBarType.fixed,
  items: [...],
);

Browser other questions tagged

You are not signed in. Login or sign up in order to post.