getScrollMetricsV method

ScrollMetrics getScrollMetricsV(
  1. Matrix4 transform,
  2. Size viewport,
  3. Size content
)

Implementation

ScrollMetrics getScrollMetricsV(
    Matrix4 transform, Size viewport, Size content) {
  double scale = transform.getScaleOnZAxis();
  Vector3 translation = transform.getTranslation();
  return FixedScrollMetrics(
    minScrollExtent: 0,
    maxScrollExtent: math.max(scale * content.height - viewport.height, 0),
    pixels: -translation.y,
    viewportDimension: viewport.height,
    axisDirection: AxisDirection.down,
    devicePixelRatio: devicePixelRatio,
  );
}