copyWith method

ZeroNavigationRailStyle copyWith({
  1. Color? backgroundColor,
  2. double? width,
  3. Color? indicatorColor,
  4. Color? activeColor,
  5. Color? inactiveColor,
  6. TextStyle? labelStyle,
  7. TextStyle? activeLabelStyle,
  8. BorderRadius? indicatorBorderRadius,
})

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

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

Implementation

ZeroNavigationRailStyle copyWith({
  Color? backgroundColor,
  double? width,
  Color? indicatorColor,
  Color? activeColor,
  Color? inactiveColor,
  TextStyle? labelStyle,
  TextStyle? activeLabelStyle,
  BorderRadius? indicatorBorderRadius,
}) {
  return ZeroNavigationRailStyle(
    backgroundColor: backgroundColor ?? backgroundColor,
    width: width ?? this.width,
    inactiveColor: inactiveColor ?? this.inactiveColor,
    activeColor: activeColor ?? this.activeColor,
    indicatorColor: indicatorColor ?? this.indicatorColor,
    labelStyle: labelStyle ?? this.labelStyle,
    activeLabelStyle: activeLabelStyle ?? this.activeLabelStyle,
    indicatorBorderRadius:
        indicatorBorderRadius ?? this.indicatorBorderRadius,
  );
}