ClipRectLayer constructor Null safety
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 null, and must not be Clip.none.
Implementation
ClipRectLayer({
Rect? clipRect,
Clip clipBehavior = Clip.hardEdge,
}) : _clipRect = clipRect,
_clipBehavior = clipBehavior,
assert(clipBehavior != null),
assert(clipBehavior != Clip.none);