主题
BoxDecoration
BoxDecoration provides a description of how to paint a box. The box has a border, a body, and may cast a shadow.
属性
| 名称 | 类型 | 默认值 | 说明 |
|---|---|---|---|
bgcolor | Optional[ColorValue] | None | The color to fill in the background of the box. |
image | Optional[DecorationImage] | None | An image to paint above the background bgcolor or gradient. |
border | Optional[Border] | None | A border to draw above the background bgcolor, gradient, and image. |
border_radius | Optional[BorderRadiusValue] | None | The border radius of the box. |
shadows | Optional[BoxShadowValue] | None | A list of shadows cast by the box. |
gradient | Optional[Gradient] | None | A gradient to use when filling the box. |
shape | BoxShape | BoxShape.RECTANGLE | The shape to fill the bgcolor, gradient, and image into and to cast as the shadows. |
blend_mode | Optional[BlendMode] | None | The blend mode to apply to the background bgcolor or gradient. |
方法
| 名称 | 类型 | 默认值 | 说明 |
|---|---|---|---|
copy | — | — | Returns a new BoxDecoration with selected fields overridden. |