BoxDecoration constructor
Creates a box decoration.
- If coloris null, this decoration does not paint a background color.
- If imageis null, this decoration does not paint a background image.
- If borderis null, this decoration does not paint a border.
- If borderRadiusis null, this decoration uses more efficient background painting commands. TheborderRadiusargument must be null ifshapeis BoxShape.circle.
- If boxShadowis null, this decoration does not paint a shadow.
- If gradientis null, this decoration does not paint gradients.
- If backgroundBlendModeis null, this decoration paints with BlendMode.srcOver
The shape argument must not be null.
Implementation
const BoxDecoration({
  this.color,
  this.image,
  this.border,
  this.borderRadius,
  this.boxShadow,
  this.gradient,
  this.backgroundBlendMode,
  this.shape = BoxShape.rectangle,
}) : assert(shape != null),
     assert(
       backgroundBlendMode == null || color != null || gradient != null,
       'backgroundBlendMode applies to BoxDecoration\'s background color or '
       'gradient, but no color or gradient was provided.'
     );