Skip to content

BoxDecoration

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

属性 ​

名称类型默认值说明
bgcolorOptional[ColorValue]NoneThe color to fill in the background of the box.
imageOptional[DecorationImage]NoneAn image to paint above the background bgcolor or gradient.
borderOptional[Border]NoneA border to draw above the background bgcolor, gradient, and image.
border_radiusOptional[BorderRadiusValue]NoneThe border radius of the box.
shadowsOptional[BoxShadowValue]NoneA list of shadows cast by the box.
gradientOptional[Gradient]NoneA gradient to use when filling the box.
shapeBoxShapeBoxShape.RECTANGLEThe shape to fill the bgcolor, gradient, and image into and to cast as the shadows.
blend_modeOptional[BlendMode]NoneThe blend mode to apply to the background bgcolor or gradient.

方法 ​

名称类型默认值说明
copy——Returns a new BoxDecoration with selected fields overridden.

关注我,学习大模型、大数据、Python等热门技术。