ClipRRectModifier constructor

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

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

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