velocityTrackerBuilder property

GestureVelocityTrackerBuilder velocityTrackerBuilder
getter/setter pair

Determines the type of velocity estimation method to use for a potential drag gesture, when a new pointer is added.

To estimate the velocity of a gesture, DragGestureRecognizer calls velocityTrackerBuilder when it starts to track a new pointer in addAllowedPointer, and add subsequent updates on the pointer to the resulting velocity tracker, until the gesture recognizer stops tracking the pointer. This allows you to specify a different velocity estimation strategy for each allowed pointer added, by changing the type of velocity tracker this GestureVelocityTrackerBuilder returns.

If left unspecified the default velocityTrackerBuilder creates a new VelocityTracker for every pointer added.

See also:

  • VelocityTracker, a velocity tracker that uses least squares estimation on the 20 most recent pointer data samples. It's a well-rounded velocity tracker and is used by default.
  • IOSScrollViewFlingVelocityTracker, a specialized velocity tracker for determining the initial fling velocity for a Scrollable on iOS, to match the native behavior on that platform.

Implementation

GestureVelocityTrackerBuilder velocityTrackerBuilder;