describeApproximatePaintClip method

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

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.

Implementation

@override
Rect describeApproximatePaintClip(RenderObject child) {
  return _isOverflowing ? Offset.zero & size : null;
}