layoutInlineChildren method
- double maxWidth,
- ChildLayouter layoutChild,
- ChildBaselineGetter getChildBaseline
Computes the layout for every inline child using the maxWidth
constraint.
Returns a list of PlaceholderDimensions, representing the layout results for each child managed by the ContainerRenderObjectMixin mixin.
The getChildBaseline
parameter and the layoutChild
parameter must be
consistent: if layoutChild
computes the size of the child without
modifying the actual layout of that child, then getChildBaseline
must
also be "dry", and vice versa.
Since this method does not impose a maximum height constraint on the inline children, some children may become taller than this RenderBox.
See also:
- TextPainter.setPlaceholderDimensions, the method that usually takes the layout results from this method as the input.
Implementation
@protected
List<PlaceholderDimensions> layoutInlineChildren(double maxWidth, ChildLayouter layoutChild, ChildBaselineGetter getChildBaseline) {
final BoxConstraints constraints = BoxConstraints(maxWidth: maxWidth);
return <PlaceholderDimensions>[
for (RenderBox? child = firstChild; child != null; child = childAfter(child))
_layoutChild(child, constraints, layoutChild, getChildBaseline),
];
}