RenderDecoratedBox constructor

RenderDecoratedBox({@required Decoration decoration, DecorationPosition position: DecorationPosition.background, ImageConfiguration configuration: ImageConfiguration.empty, RenderBox child })

Creates a decorated box.

The decoration, position, and configuration arguments must not be null. By default the decoration paints behind the child.

The ImageConfiguration will be passed to the decoration (with the size filled in) to let it resolve images.

Implementation

RenderDecoratedBox({
  @required Decoration decoration,
  DecorationPosition position = DecorationPosition.background,
  ImageConfiguration configuration = ImageConfiguration.empty,
  RenderBox child,
}) : assert(decoration != null),
     assert(position != null),
     assert(configuration != null),
     _decoration = decoration,
     _position = position,
     _configuration = configuration,
     super(child);