当我尝试添加四个图标时,我是新来的,我创建了一个底部导航栏 . 图标颜色变为白色 . 我怎么能实现这一点,任何人都可以建议我 . 以下是我的代码 . 任何帮助将不胜感激 .
bottomNavigationBar: new BottomNavigationBar(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"))
]),
1 回答
如果有3个以上的元素,则需要显式设置
type: BottomNavigationBarType.fixed,