DecoratedBox constructor Null safety
- {Key? key,
- required Decoration decoration,
- DecorationPosition position = DecorationPosition.background,
- Widget? child}
Creates a widget that paints a Decoration.
The decoration and position arguments must not be null. By default the decoration paints behind the child.
Implementation
const DecoratedBox({
super.key,
required this.decoration,
this.position = DecorationPosition.background,
super.child,
}) : assert(decoration != null),
assert(position != null);