RenderClipRect constructor Null safety

RenderClipRect(
  1. {RenderBox? child,
  2. CustomClipper<Rect>? clipper,
  3. Clip clipBehavior = Clip.antiAlias}
)

Creates a rectangular clip.

If clipper is null, the clip will match the layout size and position of the child.

The clipBehavior must not be null or Clip.none.

Implementation

RenderClipRect({
  RenderBox? child,
  CustomClipper<Rect>? clipper,
  Clip clipBehavior = Clip.antiAlias,
}) : assert(clipBehavior != null),
     assert(clipBehavior != Clip.none),
     super(child: child, clipper: clipper, clipBehavior: clipBehavior);