VelocityTracker constructor

Supported by Flutter Fix: yes

The default constructor for VelocityTrackerwas deprecated in v1.22.

The VelocityTracker.withKind() should be used instead. This allows for a
PointerDeviceKind to be specified for the tracker. The previous default for
VelocityTracker.kind was PointerDeviceKind.touch.

Migration guide

Code before migration:

final

VelocityTracker

tracker

VelocityTracker

();

Code after migration:

final

VelocityTracker

tracker

VelocityTracker

withKind

PointerDeviceKind

touch

);

References

API documentation:

VelocityTracker

PointerDeviceKind