copyWith method

BoxShadow copyWith({
  1. Color? color,
  2. Offset? offset,
  3. double? blurRadius,
  4. double? spreadRadius,
  5. BlurStyle? blurStyle,
})

Creates a copy of this object but with the given fields replaced with the new values.

Implementation

BoxShadow copyWith({
  Color? color,
  Offset? offset,
  double? blurRadius,
  double? spreadRadius,
  BlurStyle? blurStyle,
}) {
  return BoxShadow(
    color: color ?? this.color,
    offset: offset ?? this.offset,
    blurRadius: blurRadius ?? this.blurRadius,
    spreadRadius: spreadRadius ?? this.spreadRadius,
    blurStyle: blurStyle ?? this.blurStyle,
  );
}