SliverClipRect constructor

const SliverClipRect({
  1. Key? key,
  2. required Widget sliver,
  3. CustomClipper<Rect>? clipper,
  4. Clip clipBehavior = .hardEdge,
  5. ClipOverlapBehavior clipOverlap = .followEdge,
})

Creates a sliver that clips its child using a rectangle.

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

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 SliverClipRect({
  super.key,
  required Widget sliver,
  this.clipper,
  this.clipBehavior = .hardEdge,
  this.clipOverlap = .followEdge,
}) : super(child: sliver);