copyWith method

SmartNavStyle copyWith({
  1. Color? backgroundColor,
  2. Gradient? backgroundGradient,
  3. Color? borderColor,
  4. double? borderRadius,
  5. EdgeInsets? margin,
  6. EdgeInsets? padding,
  7. Color? defaultActiveColor,
  8. Color? defaultInactiveColor,
  9. TextStyle? defaultActiveTextStyle,
  10. TextStyle? defaultInactiveTextStyle,
  11. double? defaultIconSize,
  12. double? scaleFactor,
  13. Curve? animationCurve,
  14. Duration? animationDuration,
  15. 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,
  );
}