ShapeDecorationWithPremultipliedAlpha constructor

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

Creates a shape decoration with premultiplied alpha for color lerp. In others respects, it is identical to ShapeDecoration.

  • If color is null, this decoration does not paint a background color.
  • If gradient is null, this decoration does not paint gradients.
  • If image is null, this decoration does not paint a background image.
  • If shadows is null, this decoration does not paint a shadow.

The color and gradient properties are mutually exclusive, one (or both) of them must be null.

The shape must not be null.

Implementation

const ShapeDecorationWithPremultipliedAlpha({
  this.color,
  this.image,
  this.gradient,
  this.shadows,
  required this.shape,
}) : assert(!(color != null && gradient != null));