【发布时间】:2019-11-13 15:03:05
【问题描述】:
我的BottomNavigationBar 完全是白色的。当有3 图标时它工作正常,但当增加到4 时,导航栏完全变白。仍然可以选择和更改选项卡。
这是小部件运行时控制台的输出。
ic=null mNaviBarColor -15724014 mIsGetNaviBarColorSuccess true , NavVisible : true , NavTrans : false
这是导航栏的构建:
_bottomNavChildren[_currentIndex],
bottomNavigationBar: BottomNavigationBar(
onTap: onTabTapped,
currentIndex: _currentIndex,
items: [
BottomNavigationBarItem(
icon: Icon(Icons.search),
title: Text('Browse'),
),
BottomNavigationBarItem(
icon: Icon(Icons.message),
title: Text('Messages'),
),
BottomNavigationBarItem(
icon: Icon(Icons.person_outline),
title: Text('Profile'),
这是指向相关索引类的List 小部件。
int _currentIndex = 0;
final List<Widget> _bottomNavChildren = [
BrowsePage(),
MessagesPage(),
ProfilePage(),
];
有人知道是什么问题吗? 谢谢
【问题讨论】:
标签: flutter dart navigationbar