handlePanEnd method
Is called when the end of a pan gesture is detected.
See also:
- GestureDetector.onPanEnd, which this method is passed to
Implementation
void handlePanEnd(DragEndDetails details) {
final velocity = _getOffset(details.velocity.pixelsPerSecond);
if (value.distance.abs() > 100 && velocity.abs() > 300) {
value = value.copyWith(isPanning: false, wasFlung: true);
} else {
value = value.copyWith(isPanning: false);
}
}