measure method
Measures the total size required to render all children.
Skips absolutely positioned children since they don't contribute to the parent's flow layout dimensions.
Implementation
@override
Size measure(Size maxSize) {
int totalHeight = 0;
int maxWidth = 0;
for (final child in _childrenInstance) {
if (child.position.positionType == PositionType.absolute) continue;
final childSize = child.measure(maxSize);
totalHeight += childSize.height;
maxWidth = max(childSize.width, maxWidth);
}
return Size(width: maxWidth, height: totalHeight);
}