computeSpacing method
double
computeSpacing({
- required ParentLayout parent,
- required LayoutAxis axis,
- required double viewportSize,
override
Computes the spacing by calculating both operands and applying the operation.
First computes the spacing of both first and second operands using the same layout context, then applies the operation to combine them.
Implementation
@override
double computeSpacing({
required ParentLayout parent,
required LayoutAxis axis,
required double viewportSize,
}) {
double first = this.first.computeSpacing(
parent: parent,
axis: axis,
viewportSize: viewportSize,
);
double second = this.second.computeSpacing(
parent: parent,
axis: axis,
viewportSize: viewportSize,
);
return operation(first, second);
}