copyWith method

CupertinoTabBar copyWith (
  1. {Key key,
  2. List<BottomNavigationBarItem> items,
  3. Color backgroundColor,
  4. Color activeColor,
  5. Color inactiveColor,
  6. double iconSize,
  7. Border border,
  8. int currentIndex,
  9. 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,
  double 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,
  );
}