ClipRectLayer constructor

ClipRectLayer({
  1. Rect? clipRect,
  2. Clip clipBehavior = Clip.hardEdge,
})

Creates a layer with a rectangular clip.

The clipRect argument must not be null before the compositing phase of the pipeline.

The clipBehavior argument must not be Clip.none.

Implementation

ClipRectLayer({
  Rect? clipRect,
  Clip clipBehavior = Clip.hardEdge,
}) : _clipRect = clipRect,
     _clipBehavior = clipBehavior,
     assert(clipBehavior != Clip.none);