copyWith method
SmartNavStyle
copyWith({
- Color? backgroundColor,
- Gradient? backgroundGradient,
- Color? borderColor,
- double? borderRadius,
- EdgeInsets? margin,
- EdgeInsets? padding,
- Color? defaultActiveColor,
- Color? defaultInactiveColor,
- TextStyle? defaultActiveTextStyle,
- TextStyle? defaultInactiveTextStyle,
- double? defaultIconSize,
- double? scaleFactor,
- Curve? animationCurve,
- Duration? animationDuration,
- bool? showLabel,
Creates a copy of this style with the given fields replaced. Returns a new SmartNavStyle instance where non-null parameters replace the corresponding properties of the original style.
Implementation
SmartNavStyle copyWith({
Color? backgroundColor,
Gradient? backgroundGradient,
Color? borderColor,
double? borderRadius,
EdgeInsets? margin,
EdgeInsets? padding,
Color? defaultActiveColor,
Color? defaultInactiveColor,
TextStyle? defaultActiveTextStyle,
TextStyle? defaultInactiveTextStyle,
double? defaultIconSize,
double? scaleFactor,
Curve? animationCurve,
Duration? animationDuration,
bool? showLabel,
}) {
return SmartNavStyle(
backgroundColor: backgroundColor ?? this.backgroundColor,
backgroundGradient: backgroundGradient ?? this.backgroundGradient,
borderColor: borderColor ?? this.borderColor,
borderRadius: borderRadius ?? this.borderRadius,
margin: margin ?? this.margin,
padding: padding ?? this.padding,
defaultActiveColor: defaultActiveColor ?? this.defaultActiveColor,
defaultInactiveColor: defaultInactiveColor ?? this.defaultInactiveColor,
defaultActiveTextStyle:
defaultActiveTextStyle ?? this.defaultActiveTextStyle,
defaultInactiveTextStyle:
defaultInactiveTextStyle ?? this.defaultInactiveTextStyle,
defaultIconSize: defaultIconSize ?? this.defaultIconSize,
scaleFactor: scaleFactor ?? this.scaleFactor,
animationCurve: animationCurve ?? this.animationCurve,
animationDuration: animationDuration ?? this.animationDuration,
showLabel: showLabel ?? this.showLabel,
);
}