RenderDecoratedBox constructor

RenderDecoratedBox({
  1. required Decoration decoration,
  2. DecorationPosition position = DecorationPosition.background,
  3. ImageConfiguration configuration = ImageConfiguration.empty,
  4. 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,
}) : _decoration = decoration,
     _position = position,
     _configuration = configuration,
     super(child);