Skip to content

BoxDecoration

BoxDecoration #

BoxDecoration provides a description of how to paint a box. The box has a border, a body, and may cast a shadow.

bgcolor #

bgcolor: ColorValue | None = None

The color to fill in the background of the box.

blend_mode #

blend_mode: BlendMode | None = None

The blend mode to apply to the background bgcolor or gradient.

border #

border: Border | None = None

A border to draw above the background bgcolor, gradient, and image.

border_radius #

border_radius: BorderRadiusValue | None = None

The border radius of the box.

gradient #

gradient: Gradient | None = None

A gradient to use when filling the box.

image #

image: DecorationImage | None = None

An image to paint above the background bgcolor or gradient.

shadows #

shadows: BoxShadowValue | None = None

A list of shadows cast by the box.

shape #

The shape to fill the bgcolor, gradient, and image into and to cast as the shadows.

copy_with #

copy_with(
    *,
    bgcolor: ColorValue | None = None,
    image: DecorationImage | None = None,
    border: Border | None = None,
    border_radius: BorderRadiusValue | None = None,
    shadows: BoxShadowValue | None = None,
    gradient: Gradient | None = None,
    shape: BoxShape | None = None,
    blend_mode: BlendMode | None = None,
)