copyWith method

ShapeDecoration copyWith({
  1. ShapeBorder? shape,
  2. Color? color,
  3. Gradient? gradient,
  4. List<BoxShadow>? shadows,
  5. DecorationImage? image,
})

Implementation

ShapeDecoration copyWith({
  ShapeBorder? shape,
  Color? color,
  Gradient? gradient,
  List<BoxShadow>? shadows,
  DecorationImage? image,
}) {
  return ShapeDecoration(
    color: color ?? this.color,
    image: image ?? this.image,
    shape: shape ?? this.shape,
    gradient: gradient ?? this.gradient,
    shadows: shadows ?? this.shadows,
  );
}