ShapeDecoration constructor
- Color? color,
- DecorationImage? image,
- Gradient? gradient,
- List<
BoxShadow> ? shadows, - required ShapeBorder shape,
Creates a shape decoration.
- 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.
Implementation
const ShapeDecoration({
this.color,
this.image,
this.gradient,
this.shadows,
required this.shape,
}) : assert(!(color != null && gradient != null));