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