clipper property

CustomClipper<Path>? get clipper

A custom clipper that defines the path to clip sliver, foreground, and [background.

Implementation

CustomClipper<Path>? get clipper => _clipper;
set clipper (CustomClipper<Path>? newClipper)

Implementation

set clipper(CustomClipper<Path>? newClipper) {
  if (_clipper == newClipper) return;

  final didNeedCompositing = alwaysNeedsCompositing;
  final oldClipper = _clipper;
  _clipper = newClipper;

  if (didNeedCompositing != alwaysNeedsCompositing)
    markNeedsCompositingBitsUpdate();

  assert(newClipper != null || oldClipper != null);
  if (newClipper == null || oldClipper == null ||
    newClipper.runtimeType != oldClipper.runtimeType ||
    newClipper.shouldReclip(oldClipper)) _markNeedsClip();

  if (attached) {
    oldClipper?.removeListener(_markNeedsClip);
    newClipper?.addListener(_markNeedsClip);
  }
}