copyWith method

Shadow copyWith({
  1. double? offsetX,
  2. double? offsetY,
  3. double? blurRadius,
  4. double? spreadRadius,
  5. Color? color,
})

Creates a copy of the current shadow with optional new values.

Implementation

Shadow copyWith({
  double? offsetX,
  double? offsetY,
  double? blurRadius,
  double? spreadRadius,
  Color? color,
}) {
  return Shadow(
    offsetX: offsetX ?? this.offsetX,
    offsetY: offsetY ?? this.offsetY,
    blurRadius: blurRadius ?? this.blurRadius,
    spreadRadius: spreadRadius ?? this.spreadRadius,
    color: color ?? this.color,
  );
}