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. double height = _kTabBarHeight,
  10. Border? border = const Border(top: BorderSide(color: _kDefaultTabBarBorderColor, width: 0.0))}
)

Creates a tab bar in the iOS style.

Implementation

const CupertinoTabBar({
  super.key,
  required this.items,
  this.onTap,
  this.currentIndex = 0,
  this.backgroundColor,
  this.activeColor,
  this.inactiveColor = _kDefaultTabBarInactiveColor,
  this.iconSize = 30.0,
  this.height = _kTabBarHeight,
  this.border = const Border(
    top: BorderSide(
      color: _kDefaultTabBarBorderColor,
      width: 0.0, // 0.0 means one physical pixel
    ),
  ),
}) : assert(
       items.length >= 2,
       "Tabs need at least 2 items to conform to Apple's HIG",
     ),
     assert(0 <= currentIndex && currentIndex < items.length),
     assert(height >= 0.0);