ClipPathLayer constructor

ClipPathLayer({@required Path clipPath, Clip clipBehavior: Clip.antiAlias })

Creates a layer with a path-based clip.

The clipPath property must be non-null before the compositing phase of the pipeline.

Implementation

ClipPathLayer({ @required Path clipPath, Clip clipBehavior = Clip.antiAlias }) :
      _clipPath = clipPath, _clipBehavior = clipBehavior,
      assert(clipBehavior != null), assert(clipBehavior != Clip.none);