along method Null safety

double along(
  1. Axis axis
)

The total offset in the given direction.

Implementation

double along(Axis axis) {
  assert(axis != null);
  switch (axis) {
    case Axis.horizontal:
      return horizontal;
    case Axis.vertical:
      return vertical;
  }
}