copyWith method

ZeroNavigationBarStyle copyWith({
  1. Color? backgroundColor,
  2. Color? indicatorColor,
  3. Color? unselectedColor,
  4. Color? selectedColor,
  5. Color? unselectedIconColor,
  6. Color? selectedIconColor,
  7. double? height,
  8. ZeroNavigationBarIndicatorType? indicatorType,
})

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

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

Implementation

ZeroNavigationBarStyle copyWith({
  Color? backgroundColor,
  Color? indicatorColor,
  Color? unselectedColor,
  Color? selectedColor,
  Color? unselectedIconColor,
  Color? selectedIconColor,
  double? height,
  ZeroNavigationBarIndicatorType? indicatorType,
}) {
  return ZeroNavigationBarStyle(
    backgroundColor: backgroundColor ?? this.backgroundColor,
    indicatorColor: indicatorColor ?? this.indicatorColor,
    unselectedColor: unselectedColor ?? this.unselectedColor,
    selectedColor: selectedColor ?? this.selectedColor,
    unselectedIconColor:
        unselectedIconColor ?? unselectedColor ?? this.unselectedIconColor,
    selectedIconColor:
        selectedIconColor ?? selectedColor ?? this.selectedIconColor,
    height: height ?? this.height,
    indicatorType: indicatorType ?? this.indicatorType,
  );
}