adjustSize method

double? adjustSize({
  1. required ParentLayout parent,
  2. required LayoutAxis axis,
  3. required double viewportSize,
  4. required double contentSize,
})

Optionally adjusts the size of the child during alignment.

Some alignment modes (like stretch) may modify the child's size to fill available space. This method returns the adjusted size, or null if no size adjustment is needed.

Parameters:

  • parent: The parent layout context
  • axis: The axis along which sizing is being considered
  • viewportSize: The available viewport size
  • contentSize: The child's natural content size

Returns the adjusted size, or null to use the natural size.

Implementation

double? adjustSize({
  required ParentLayout parent,
  required LayoutAxis axis,
  required double viewportSize,
  required double contentSize,
}) => null;