computeSpacing abstract method
double
computeSpacing({
- required ParentLayout parent,
- required LayoutAxis axis,
- required double maxSpace,
- required double availableSpace,
- 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 contextaxis
: The axis along which spacing is calculatedmaxSpace
: The maximum allowed spacingavailableSpace
: The total available space for distributionaffectedCount
: 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,
});