Commit 720a913e authored by Hans Muller's avatar Hans Muller

replace endDistance and endVelocity parameters with tolerance

parent 461b1914
...@@ -108,9 +108,11 @@ Simulation _createDefaultScrollSimulation(double position, double velocity, doub ...@@ -108,9 +108,11 @@ Simulation _createDefaultScrollSimulation(double position, double velocity, doub
// destiniation scroll offset. // destiniation scroll offset.
double endDistance = 0.5 * sky.view.devicePixelRatio; 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); SpringDescription spring = new SpringDescription.withDampingRatio(mass: 1.0, springConstant: 170.0, ratio: 1.1);
return new ScrollSimulation( 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 /// A scroll behavior that lets the user scroll beyond the scroll bounds with some resistance
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment