ClipPath constructor Null safety
- {Key? key,
- CustomClipper<
Path> ? clipper, - Clip clipBehavior = Clip.antiAlias,
- 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. If clipBehavior is Clip.none, no clipping will be applied.
Implementation
const ClipPath({
super.key,
this.clipper,
this.clipBehavior = Clip.antiAlias,
super.child,
}) : assert(clipBehavior != null);