computeSpacing method

  1. @override
double computeSpacing({
  1. required ParentLayout parent,
  2. required LayoutAxis axis,
  3. 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);
}