copyWith method

SMenuItemStyle copyWith({
  1. MainAxisAlignment? alignment,
  2. BorderRadius? borderRadius,
  3. OutlinedBorder? shape,
  4. double? elevation,
  5. EdgeInsets? padding,
  6. double? width,
  7. double? height,
  8. Color? accentColor,
  9. Color? bgColor,
  10. MouseCursor? mouseCursor,
  11. BorderSide? side,
})

Creates a new style object with same properties as this style object except for properties that were provided in the function.

Implementation

SMenuItemStyle copyWith({
  final MainAxisAlignment? alignment,
  final BorderRadius? borderRadius,
  final OutlinedBorder? shape,
  final double? elevation,
  final EdgeInsets? padding,
  final double? width,
  final double? height,
  final Color? accentColor,
  final Color? bgColor,
  final MouseCursor? mouseCursor,
  final BorderSide? side,
}) {
  return SMenuItemStyle(
      elevation: elevation ?? this.elevation,
      alignment: alignment ?? this.alignment,
      shape: shape ?? this.shape,
      width: width ?? this.width,
      borderRadius: borderRadius ?? this.borderRadius,
      padding: padding ?? this.padding,
      height: height ?? this.height,
      accentColor: accentColor ?? this.accentColor,
      bgColor: bgColor ?? this.bgColor,
      mouseCursor: mouseCursor ?? this.mouseCursor,
      side: side ?? this.side);
}