resolveValue method

double resolveValue(
  1. Axis axis
)

Resolves the alignment value for a specific axis.

Parameters:

  • axis (Axis, required): The axis to resolve for.

Returns: The resolved alignment value.

Implementation

double resolveValue(Axis axis) {
  return switch ((direction, axis)) {
    (TextDirection.ltr, Axis.horizontal) => value,
    (TextDirection.rtl, Axis.horizontal) => value * -1,
    _ => value,
  };
}