DecoratedBox constructor

const DecoratedBox(
  1. {Key key,
  2. @required Decoration decoration,
  3. DecorationPosition position: DecorationPosition.background,
  4. 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.


const DecoratedBox({
  Key key,
  @required this.decoration,
  this.position = DecorationPosition.background,
  Widget child,
}) : assert(decoration != null),
     assert(position != null),
     super(key: key, child: child);