BoxDecoration
BoxDecoration provides a description of how to paint a box. The box has a border, a body, and may cast a shadow.
Properties
bgcolor- The color to fill in the background of the box.blend_mode- The blend mode to apply to the backgroundbgcolororgradient.border- A border to draw above the backgroundbgcolor,gradient, andimage.border_radius- The border radius of the box.gradient- A gradient to use when filling the box.image- An image to paint above the backgroundbgcolororgradient.shadows- A list of shadows cast by the box.shape- The shape to fill thebgcolor,gradient, andimageinto and to cast as theshadows.
Methods
copy- Returns a newBoxDecorationwith selected fields overridden.
Properties
bgcolorclass-attributeinstance-attribute
bgcolor: ColorValue | None = NoneThe color to fill in the background of the box.
blend_modeclass-attributeinstance-attribute
blend_mode: BlendMode | None = NoneThe blend mode to apply to the background bgcolor or gradient.
borderclass-attributeinstance-attribute
border: Border | None = NoneA border to draw above the background bgcolor, gradient, and image.
border_radiusclass-attributeinstance-attribute
border_radius: BorderRadiusValue | None = NoneThe border radius of the box.
gradientclass-attributeinstance-attribute
gradient: Gradient | None = NoneA gradient to use when filling the box.
imageclass-attributeinstance-attribute
image: DecorationImage | None = Noneshadowsclass-attributeinstance-attribute
shadows: BoxShadowValue | None = NoneA list of shadows cast by the box.
Methods
copy
copy(
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,
)Returns a new BoxDecoration with selected fields overridden.