Skip to content

BoxShape

Inherits: Enum

The shape to use when rendering a Border or BoxDecoration.

Properties

  • CIRCLE

    A circle centered in the middle of the box into which the Border or

  • RECTANGLE

    An axis-aligned rectangle, optionally with rounded corners.

Properties#

CIRCLE = 'circle' class-attribute instance-attribute #

A circle centered in the middle of the box into which the Border or BoxDecoration is painted. The diameter of the circle is the shortest dimension of the box, either the width or the height, such that the circle touches the edges of the box.

RECTANGLE = 'rectangle' class-attribute instance-attribute #

An axis-aligned rectangle, optionally with rounded corners.

The amount of corner rounding, if any, is determined by the border radius specified by classes such as BoxDecoration or Border. The rectangle's edges match those of the box in which it is painted.