ShapeDecoration constructor
Creates a shape decoration.
- If
coloris null, this decoration does not paint a background color. - If
gradientis null, this decoration does not paint gradients. - If
imageis null, this decoration does not paint a background image. - If
shadowsis 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 ShapeDecoration({
this.color,
this.image,
this.gradient,
this.shadows,
@required this.shape,
}) : assert(!(color != null && gradient != null)),
assert(shape != null);