computeSpacing abstract method

double computeSpacing({
  1. required LayoutAxis axis,
  2. required double viewportSize,
})

Computes the actual spacing value.

Spacing units are computed during layout to determine margins, padding, or gaps between elements. The calculation considers available space, maximum allowed space, and the number of affected elements.

Parameters:

  • parent: The parent layout context
  • axis: The axis along which spacing is calculated
  • maxSpace: The maximum allowed spacing
  • availableSpace: The total available space for distribution
  • affectedCount: Number of elements affected by this spacing

Returns the computed spacing value.

Implementation

double computeSpacing({
  required LayoutAxis axis,
  required double viewportSize,
});