copyWith method

SMenuStyle copyWith({
  1. BorderRadius? borderRadius,
  2. EdgeInsets? padding,
  3. BoxBorder? border,
  4. CrossAxisAlignment? alignment,
  5. Color? barrierColor,
  6. Color? backgroundColor,
})

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

Implementation

SMenuStyle copyWith({
  final BorderRadius? borderRadius,
  final EdgeInsets? padding,
  final BoxBorder? border,
  final CrossAxisAlignment? alignment,
  final Color? barrierColor,
  final Color? backgroundColor,
}) {
  return SMenuStyle(
    alignment: alignment ?? this.alignment,
    backgroundColor: backgroundColor ?? this.backgroundColor,
    barrierColor: barrierColor ?? this.barrierColor,
    border: border ?? this.border,
    borderRadius: borderRadius ?? this.borderRadius,
    padding: padding ?? this.padding,
  );
}