getPanAxis function

Axis? getPanAxis(
  1. Offset point1,
  2. Offset point2
)

Implementation

Axis? getPanAxis(Offset point1, Offset point2) {
  if (point1 == point2) {
    return null;
  }
  final double x = point2.dx - point1.dx;
  final double y = point2.dy - point1.dy;
  return x.abs() > y.abs() ? Axis.horizontal : Axis.vertical;
}