computeSpacing abstract method

double computeSpacing({
  1. required ParentLayout parent,
  2. required LayoutAxis axis,
  3. required double maxSpace,
  4. required double availableSpace,
  5. required int affectedCount,
})

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 ParentLayout parent,
  required LayoutAxis axis,
  required double maxSpace,
  required double availableSpace,
  required int affectedCount,
});