本文链接:https://blog.youkuaiyun.com/Briantmac/article/details/88809573
作者:Briantmac,转载请注明。
确定导航栏选项
1、当导航栏选项<=3时,不用额外设置即可实现fixedColor方法;
2、当导航栏选项>=4时,需指定type: BottomNavigationBarType.fixed才可实现fixedColor方法。
查看BottomNavigationBar组件的源码可以发现端倪:
BottomNavigationBar({
Key key,
@required this.items,
this.onTap,
this.currentIndex = 0,
BottomNavigationBarType type,
this.fixedColor,
this.iconSize = 24.0,
}) : assert(items != null),
assert(items.length >= 2),
assert(
items.every((BottomNavigationBarItem item) => item.title != null) == true,
'Every item must have a non-null title',
),
assert(0 <= currentIndex && currentIndex

最低0.47元/天 解锁文章
1587

被折叠的 条评论
为什么被折叠?



