DecorationDelta.shapeDelta constructor

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

Creates a partial modification that always produces a ShapeDecoration.

When applied to a BoxDecoration, converts via ShapeDecoration.fromBoxDecoration.

Contract

Throws an error if applied to a Decoration that is neither a BoxDecoration nor ShapeDecoration.

Implementation

const factory DecorationDelta.shapeDelta({
  Color? color,
  DecorationImage? image,
  Gradient? gradient,
  List<BoxShadow>? shadows,
  ShapeBorder? shape,
}) = _DecorationShapeDelta;