align abstract method

double align({
  1. required ParentLayout parent,
  2. required LayoutAxis axis,
  3. required double viewportSize,
  4. required double contentSize,
  5. required double maxBaseline,
  6. 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 context
  • axis: The axis along which alignment is being calculated
  • viewportSize: The size of the viewport/container
  • contentSize: The natural size of the content being aligned
  • maxBaseline: 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,
});