forEachChild method
void
forEachChild(
- void callback(
- BoxConstraints constraints,
- Size size,
- OffsetWrapper offset,
- int childIndex,
Implementation
void forEachChild(
void Function(BoxConstraints constraints, Size size,
OffsetWrapper offset, int childIndex)
callback) {
assert(
childrenSizes.length == childrenParentData.length,
"Do not add or remove items to/from the childrenSizes and "
"childrenParentData lists.");
for (int i = 0, j = 0;
i < childrenSizes.length && j < childrenParentData.length;
i++, j++) {
callback(constraints, childrenSizes[i],
OffsetWrapper(childrenParentData[i]), i); // i should be equals to j
}
}