CupertinoTabBar:带有子项的tabBar,不建议直接使用,建议和AppBar搭配使用
CupertinoTabBar({
Key key,
@required this.items,
this.onTap,
this.currentIndex = 0,
this.backgroundColor,
this.activeColor,
this.inactiveColor = _kDefaultTabBarInactiveColor,
this.iconSize = 30.0,
this.border = const Border(
top: BorderSide(
color: _kDefaultTabBarBorderColor,
width: 0.0, // One physical pixel.
style: BorderStyle.solid,
),
),
})
items:
类型:BottomNavigationBarItem
描述:导航栏子项
onTap:
描述:当点击子项时会被回调
currentIndex :
类型:int
描述:被选中的子项
activeColor:
类型:color
描述:被选中时的子项的颜色
inactiveColor:
类型:color
描述:没有被选中的子项的颜色
iconSize:
类型:double
描述:子项图标的大小
border:
类型:Border
描述:边框的颜色、大小和样式