sortedPreviousPaintSibling method
Gets the previous sibling to paint before the given child.
Considers both paint reversal and custom sorting to determine the correct previous child in paint order.
Implementation
RenderBox? sortedPreviousPaintSibling(RenderBox child) {
final childParentData = child.parentData as LayoutBoxParentData;
if (isSorted) {
return reversePaint
? childParentData._nextSortedSibling
: childParentData._previousSortedSibling;
}
return reversePaint
? childParentData.nextSibling
: childParentData.previousSibling;
}