Commit abd7059f authored by Hans Muller's avatar Hans Muller

Set simulation tolerance field

parent 720a913e
......@@ -108,11 +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, minScrollOffset, maxScrollOffset, spring, _kScrollDrag, tolerance);
ScrollSimulation simulation =
new ScrollSimulation(position, startVelocity, minScrollOffset, maxScrollOffset, spring, _kScrollDrag)
..tolerance = new Tolerance(velocity: endVelocity, distance: endDistance);
return simulation;
}
/// 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