copyWith method

CupertinoTabBar copyWith ({Key key, List<BottomNavigationBarItem> items, Color backgroundColor, Color activeColor, Color inactiveColor, Size iconSize, Border border, int currentIndex, ValueChanged<int> onTap })

Create a clone of the current CupertinoTabBar but with provided parameters overridden.

Implementation

CupertinoTabBar copyWith({
  Key key,
  List<BottomNavigationBarItem> items,
  Color backgroundColor,
  Color activeColor,
  Color inactiveColor,
  Size iconSize,
  Border border,
  int currentIndex,
  ValueChanged<int> onTap,
}) {
  return CupertinoTabBar(
    key: key ?? this.key,
    items: items ?? this.items,
    backgroundColor: backgroundColor ?? this.backgroundColor,
    activeColor: activeColor ?? this.activeColor,
    inactiveColor: inactiveColor ?? this.inactiveColor,
    iconSize: iconSize ?? this.iconSize,
    border: border ?? this.border,
    currentIndex: currentIndex ?? this.currentIndex,
    onTap: onTap ?? this.onTap,
  );
}