clipPath method

Widget clipPath({
  1. Clip clipBehavior = Clip.antiAlias,
  2. required CustomClipper<Path> clipper,
})

Clips this widget to a custom path.

Parameters:

  • clipBehavior (Clip, default: Clip.antiAlias): Clipping behavior.
  • clipper (CustomClipper<Path>, required): Custom clipper for the path.

Returns: Widget — clipped widget.

Implementation

Widget clipPath(
    {Clip clipBehavior = Clip.antiAlias,
    required CustomClipper<Path> clipper}) {
  return ClipPath(
    clipBehavior: clipBehavior,
    clipper: clipper,
    child: this,
  );
}