Open
Description
need to include shadow clipping?
It is possible that the business has set a large widget shadow area, and if this is a slideable list, there may be a bias in the exposure calculation.
`Rect _computeClipRect() {
assert(RendererBinding.instance?.renderView != null);
var clipRect = Offset.zero & RendererBinding.instance!.renderView.size;
var parentLayer = parent;
while (parentLayer != null) {
Rect? curClipRect;
if (parentLayer is ClipRectLayer) {
curClipRect = parentLayer.clipRect;
} else if (parentLayer is ClipRRectLayer) {
curClipRect = parentLayer.clipRRect!.outerRect;
} else if (parentLayer is ClipPathLayer) {
curClipRect = parentLayer.clipPath!.getBounds();
}
/// the pruning of the shadow part should also be accumulated
/// otherwise the calculation of the exposure area caused by the shadow area may be too large
else if (parentLayer is PhysicalModelLayer) {
curClipRect = parentLayer.clipPath!.getBounds();
}
if (curClipRect != null) {
curClipRect = _localRectToGlobal(parentLayer, curClipRect);
clipRect = clipRect.intersect(curClipRect);
}
parentLayer = parentLayer.parent;
}
return clipRect;
}`