ClipPath constructor

const ClipPath(
  1. {Key key,
  2. CustomClipper<Path> clipper,
  3. Clip clipBehavior: Clip.antiAlias,
  4. Widget child}
)

Creates a path clip.

If clipper is null, the clip will be a rectangle that matches the layout size and location of the child. However, rather than use this default, consider using a ClipRect, which can achieve the same effect more efficiently.

The clipBehavior argument must not be null or Clip.none.

Implementation

const ClipPath({
  Key key,
  this.clipper,
  this.clipBehavior = Clip.antiAlias,
  Widget child,
}) : assert(clipBehavior != null),
     super(key: key, child: child);