RenderClipRRect constructor Null safety

RenderClipRRect(
  1. {RenderBox? child,
  2. BorderRadiusGeometry borderRadius = BorderRadius.zero,
  3. CustomClipper<RRect>? clipper,
  4. Clip clipBehavior = Clip.antiAlias,
  5. TextDirection? textDirection}
)

Creates a rounded-rectangular clip.

The borderRadius defaults to BorderRadius.zero, i.e. a rectangle with right-angled corners.

If clipper is non-null, then borderRadius is ignored.

The clipBehavior argument must not be null. If clipBehavior is Clip.none, no clipping will be applied.

Implementation

RenderClipRRect({
  super.child,
  BorderRadiusGeometry borderRadius = BorderRadius.zero,
  CustomClipper<RRect>? clipper,
  super.clipBehavior,
  TextDirection? textDirection,
}) : assert(clipBehavior != null),
     _borderRadius = borderRadius,
     _textDirection = textDirection,
     super(clipper: clipper) {
  assert(_borderRadius != null || clipper != null);
}