loopOverChildren method
void
loopOverChildren(
- void callback(
- RenderBox child,
- int childIndex
), [
- bool? reversed
])
Implementation
void loopOverChildren(
void Function(RenderBox child, int childIndex) callback, [
bool? reversed,
]) {
final isReversed = reversed ?? textDirection == TextDirection.rtl;
var child = isReversed ? lastChild : firstChild;
var childIndex = isReversed ? childCount - 1 : 0;
while (child != null) {
callback(child, childIndex);
final childParentData = child.parentData as _BreadcrumbChild;
if (isReversed) {
child = childParentData.previousSibling;
childIndex--;
} else {
child = childParentData.nextSibling;
childIndex++;
}
}
}