RenderSliverPadding constructor Null safety

RenderSliverPadding(
  1. {required EdgeInsetsGeometry padding,
  2. TextDirection? textDirection,
  3. RenderSliver? child}
)

Creates a render object that insets its child in a viewport.

The padding argument must not be null and must have non-negative insets.

Implementation

RenderSliverPadding({
  required EdgeInsetsGeometry padding,
  TextDirection? textDirection,
  RenderSliver? child,
}) : assert(padding != null),
     assert(padding.isNonNegative),
     _padding = padding,
     _textDirection = textDirection {
  this.child = child;
}