copyWith method

ZeroTabBarStyle copyWith({
  1. Color? backgroundColor,
  2. Color? activeColor,
  3. Color? inactiveColor,
  4. Color? indicatorColor,
  5. EdgeInsetsGeometry? padding,
  6. EdgeInsetsGeometry? labelPadding,
  7. double? iconSize,
  8. TextStyle? labelStyle,
  9. bool? isScrollable,
})

If the caller passes in a value for a parameter, use that value, otherwise use the value from this object.

A new instance of ZeroTabBarStyle with the same properties as the original instance, except for the properties that are explicitly overridden.

Implementation

ZeroTabBarStyle copyWith({
  Color? backgroundColor,
  Color? activeColor,
  Color? inactiveColor,
  Color? indicatorColor,
  EdgeInsetsGeometry? padding,
  EdgeInsetsGeometry? labelPadding,
  double? iconSize,
  TextStyle? labelStyle,
  bool? isScrollable,
}) {
  return ZeroTabBarStyle(
    backgroundColor: backgroundColor ?? this.backgroundColor,
    activeColor: activeColor ?? this.activeColor,
    inactiveColor: inactiveColor ?? this.inactiveColor,
    indicatorColor: indicatorColor ?? this.indicatorColor,
    padding: padding ?? this.padding,
    labelPadding: labelPadding ?? this.labelPadding,
    iconSize: iconSize ?? this.iconSize,
    labelStyle: labelStyle ?? this.labelStyle,
    isScrollable: isScrollable ?? this.isScrollable,
  );
}