align abstract method
double
align({
- required ParentLayout parent,
- required LayoutAxis axis,
- required double viewportSize,
- required double contentSize,
- required double maxBaseline,
- required double childBaseline,
Calculates the alignment position for a child within its parent container.
This method determines where along the alignment axis the child should be positioned. The calculation considers the parent's layout properties, the axis being aligned, viewport size, content size, and baseline information.
Parameters:
parent
: The parent layout containing alignment contextaxis
: The axis along which alignment is being calculatedviewportSize
: The size of the viewport/containercontentSize
: The natural size of the content being alignedmaxBaseline
: The maximum baseline value among siblings (for baseline alignment)childBaseline
: The baseline value of the current child
Returns the position offset from the start of the alignment axis.
Implementation
double align({
required ParentLayout parent,
required LayoutAxis axis,
required double viewportSize,
required double contentSize,
required double maxBaseline,
required double childBaseline,
});