Skip to main content

DecoratedBox

Overview​

Applies decorations such as a background color, border, shadow, and gradient. For example, give a card both a shadow and a border.

Properties​

PropertyDescriptionValueDefault
positionSets whether the decoration is drawn behind the child widget (background) or in front of it (foreground).background (behind), foreground (in front)background (behind)
decorationSets the box decoration applied to the child widget — background color, border, corner radius, shadow, gradient, and more.color, border, borderRadius, boxShadow, backgroundBlendMode, and gradient can each be set individuallyEmpty