layout method
void
layout(
- LayoutRect parentOffset,
- LayoutOffset offset,
- LayoutSize size,
- OverflowBounds overflowBounds, {
- LayoutOffset? revealOffset,
override
Performs the actual layout of this child within the given constraints.
This method calculates and sets the child's size and position based on
the provided constraints and the child's layout data. After calling this,
the child's size and offset properties will be valid.
Implementation
@override
void layout(
LayoutRect parentOffset,
LayoutOffset offset,
LayoutSize size,
OverflowBounds overflowBounds, {
LayoutOffset? revealOffset,
}) {
box.parentData.offset = offset;
assert(size.width.isFinite && size.height.isFinite);
if (box.size != size) {
box.size = size;
}
}