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