-
Notifications
You must be signed in to change notification settings - Fork 30.1k
Closed
Labels
customer: galleryRelating to flutter/gallery repository. Please transfer non-framework issues there.Relating to flutter/gallery repository. Please transfer non-framework issues there.frameworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.waiting for PR to land (fixed)A fix is in flightA fix is in flight
Description
ScrollableState currently handles drag release events by starting a scroll offset animation, even when the corresponding fling gesture's velocity is below the threshold:
void _handleDragEnd(DragEndDetails details) {
final double scrollVelocity = pixelDeltaToScrollOffset(details.velocity.pixelsPerSecond);
fling(scrollVelocity).then((Null _) {
_endScroll(details: details);
});
}
Future<Null> fling(double scrollVelocity) {
if (scrollVelocity.abs() > kPixelScrollTolerance.velocity || !_controller.isAnimating)
return _startToEndAnimation(scrollVelocity);
return new Future<Null>.value();
}
The || !_controller.isAnimating expression causes the fling animation to be started even when the velocity is below threshold (unless there's scroll animation underway already).
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
customer: galleryRelating to flutter/gallery repository. Please transfer non-framework issues there.Relating to flutter/gallery repository. Please transfer non-framework issues there.frameworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.waiting for PR to land (fixed)A fix is in flightA fix is in flight