hold method

  1. @override
ScrollHoldController hold(
  1. 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;
}