movePage method

bool movePage(
  1. Offset delta,
  2. Axis axis
)

Implementation

bool movePage(Offset delta, Axis axis) {
  if (totalScale! <= 1.0) {
    return false;
  }
  switch (axis) {
    case Axis.horizontal:
      return delta.dx != 0 &&
          delta.dx.abs() > delta.dy.abs() &&
          ((delta.dx < 0 && boundary.right) ||
              (delta.dx > 0 && boundary.left) ||
              !_computeHorizontalBoundary);

    case Axis.vertical:
      return delta.dy != 0 &&
          delta.dy.abs() > delta.dx.abs() &&
          ((delta.dy < 0 && boundary.bottom) ||
              (delta.dy > 0 && boundary.top) ||
              !_computeVerticalBoundary);
  }
}