DecoratedBox class

A widget that paints a Decoration either before or after its child paints.

Container insets its child by the widths of the borders; this widget does not.

Commonly used with BoxDecoration.

Inheritance

Constructors

DecoratedBox({required Decoration decoration, DecorationPosition position = DecorationPosition.background, Widget? child, Key? key})
Creates a widget that paints a Decoration.
const

Properties

child Widget?
The child value.
finalinherited
decoration Decoration
What decoration to paint.
final
hashCode int
The hash code for this object.
no setterinherited
key Key?
Controls how this widget replaces another of the same type.
finalinherited
position DecorationPosition
Whether to paint the box decoration behind or in front of the child.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

createElement() SingleChildRenderObjectElement
Create the appropriate Element for this RenderObjectWidget
inherited
createRenderObject(BuildContext context) RenderObject
Create the RenderObject for this widget
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited
updateRenderObject(BuildContext context, covariant RenderDecoratedBox renderObject) → void
Update the RenderObject with new configuration
override

Operators

operator ==(Object other) bool
The equality operator.
inherited