ClipRRect constructor Null safety

const ClipRRect(
  1. {Key? key,
  2. BorderRadius? borderRadius,
  3. CustomClipper<RRect>? clipper,
  4. Clip clipBehavior,
  5. Widget? child}
)

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 or Clip.none.

Implementation

const ClipRRect({
  Key? key,
  this.borderRadius = BorderRadius.zero,
  this.clipper,
  this.clipBehavior = Clip.antiAlias,
  Widget? child,
}) : assert(borderRadius != null || clipper != null),
     assert(clipBehavior != null),
     super(key: key, child: child);