当有3个以上的元素时,需要显式设置
type: BottomNavigationBarType.fixed,
bottomNavigationBar: new BottomNavigationBar(
type: BottomNavigationBarType.fixed,
items: [
new BottomNavigationBarItem(icon: new Icon(Icons.add), title: new Text("Text")),
new BottomNavigationBarItem(icon: new Icon(Icons.person), title: new Text("Contact")),
new BottomNavigationBarItem(icon: new Icon(Icons.accessibility), title: new Text("Acess")),
new BottomNavigationBarItem(icon: new Icon(Icons.account_balance), title: new Text("Balance"))
]),
如果提供的BottomNavigationBar项超过3个,则类型(如果未指定)将更改为BottomNavigationBarType.shifting per。
https://docs.flutter.io/flutter/material/BottomNavigationBar/BottomNavigationBar.html
。