handleTrackTapDownVertical method

void handleTrackTapDownVertical(
  1. TapDownDetails details
)

Implementation

void handleTrackTapDownVertical(TapDownDetails details) {
  // The Scrollbar should page towards the position of the tap on the track.
  Matrix4 transform = controlInterface.getTransform();
  final ScrollMetrics metrics = getScrollMetricsV(transform,
      controlInterface.getViewport(), controlInterface.getContent());
  if (!physics.shouldAcceptUserOffset(metrics)) {
    return;
  }
  late final double delta;
  if (details.localPosition.dy < verticalScrollbar.thumbOffset) {
    delta = -metrics.viewportDimension * 0.8;
  } else {
    delta = metrics.viewportDimension * 0.8;
  }
  controlInterface.animateVertical(
    delta,
    const Duration(milliseconds: 100),
    Curves.easeInOut,
  );
}