hold method

  1. @override
ScrollHoldController hold (VoidCallback holdCancelCallback)
override

Stop the current activity and start a HoldScrollActivity.

Implementation

@override
ScrollHoldController hold(VoidCallback holdCancelCallback) {
  final double previousVelocity = activity.velocity;
  final HoldScrollActivity holdActivity = HoldScrollActivity(
    delegate: this,
    onHoldCanceled: holdCancelCallback,
  );
  beginActivity(holdActivity);
  _heldPreviousVelocity = previousVelocity;
  return holdActivity;
}