getDragExtent method

double getDragExtent(
  1. double ratio
)

calculate the final drag extent after animating ends so that the next dragging could start from the previous drag extent

Implementation

double getDragExtent(double ratio) {
  final mainAxis = axis == Axis.horizontal
      ? size.width * maxSlideThreshold
      : size.height * maxSlideThreshold;
  return mainAxis * ratio;
}