shape property

  1. @override
BoxShape shape
final

The shape to fill the background color, gradient, and image into and to cast as the boxShadow.

If this is BoxShape.circle then borderRadius is ignored.

The shape cannot be interpolated; animating between two BoxDecorations with different shapes will result in a discontinuity in the rendering. To interpolate between two shapes, consider using ShapeDecoration and different ShapeBorders; in particular, CircleBorder instead of BoxShape.circle and RoundedRectangleBorder instead of BoxShape.rectangle.

The shape or the borderRadius won't clip the children of the decorated Container. If the clip is required, insert a clip widget (e.g., ClipRect, ClipRRect, ClipPath) as the child of the Container. Be aware that clipping may be costly in terms of performance.

Implementation

@override
final BoxShape shape;