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