From 90e08ea94bfed47ad3d3a239c835a41fb3d523c5 Mon Sep 17 00:00:00 2001 From: Hans Muller Date: Tue, 22 Sep 2015 14:50:27 -0700 Subject: [PATCH] replace endDistance and endVelocity parameters with tolerance --- sky/packages/sky/lib/src/animation/scroll_behavior.dart | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sky/packages/sky/lib/src/animation/scroll_behavior.dart b/sky/packages/sky/lib/src/animation/scroll_behavior.dart index d800b82cfd6..09db0c7f07d 100644 --- a/sky/packages/sky/lib/src/animation/scroll_behavior.dart +++ b/sky/packages/sky/lib/src/animation/scroll_behavior.dart @@ -108,9 +108,11 @@ Simulation _createDefaultScrollSimulation(double position, double velocity, doub // destiniation scroll offset. double endDistance = 0.5 * sky.view.devicePixelRatio; + Tolerance tolerance = new Tolerance(velocity: endVelocity, distance: endDistance); SpringDescription spring = new SpringDescription.withDampingRatio(mass: 1.0, springConstant: 170.0, ratio: 1.1); return new ScrollSimulation( - position, startVelocity, endVelocity, endDistance, minScrollOffset, maxScrollOffset, spring, _kScrollDrag); + position, startVelocity, minScrollOffset, maxScrollOffset, spring, _kScrollDrag, tolerance); + } /// A scroll behavior that lets the user scroll beyond the scroll bounds with some resistance