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