describeApproximatePaintClip method Null safety

  1. @override
Rect? describeApproximatePaintClip(
  1. covariant RenderObject child

Returns a rect in this object's coordinate system that describes the approximate bounding box of the clip rect that would be applied to the given child during the paint phase, if any.

Returns null if the child would not be clipped.

This is used in the semantics phase to avoid including children that are not physically visible.


Rect? describeApproximatePaintClip(RenderObject child) => _hasOverflow ? & size : null;