CupertinoTabBar constructor

const CupertinoTabBar(
  1. {Key key,
  2. @required List<BottomNavigationBarItem> items,
  3. ValueChanged<int> onTap,
  4. int currentIndex: 0,
  5. Color backgroundColor,
  6. Color activeColor,
  7. Color inactiveColor: _kDefaultTabBarInactiveColor,
  8. double iconSize: 30.0,
  9. Border border: const Border(top: BorderSide(color: _kDefaultTabBarBorderColor, width: 0.0, style: BorderStyle.solid))}
)

Creates a tab bar in the iOS style.

Implementation

const 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,
    ),
  ),
}) : assert(items != null),
     assert(
       items.length >= 2,
       "Tabs need at least 2 items to conform to Apple's HIG",
     ),
     assert(currentIndex != null),
     assert(0 <= currentIndex && currentIndex < items.length),
     assert(iconSize != null),
     assert(inactiveColor != null),
     super(key: key);