SliverClipRRect constructor

const SliverClipRRect({
  1. Key? key,
  2. required Widget sliver,
  3. BorderRadiusGeometry borderRadius = .zero,
  4. CustomClipper<RRect>? clipper,
  5. Clip clipBehavior = .antiAlias,
  6. ClipOverlapBehavior clipOverlap = .followEdge,
})

Creates a sliver that clips its child using a rounded rectangle.

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

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

If clipBehavior is Clip.none, no clipping will be applied.

The clipOverlap parameter controls how the clip reacts to the area that overlaps with a preceding pinned sliver:

Implementation

const SliverClipRRect({
  super.key,
  required Widget sliver,
  this.borderRadius = .zero,
  this.clipper,
  this.clipBehavior = .antiAlias,
  this.clipOverlap = .followEdge,
}) : super(child: sliver);