Commit 66f064ea authored by Hans Muller's avatar Hans Muller

spring can be null drag must not be

parent 6c639ee3
...@@ -18,12 +18,11 @@ class ScrollSimulation extends SimulationGroup { ...@@ -18,12 +18,11 @@ class ScrollSimulation extends SimulationGroup {
double _offset = 0.0; double _offset = 0.0;
ScrollSimulation(double position, double velocity, double leading, ScrollSimulation(double position, double velocity, double leading,
double trailing, [SpringDescription spring, double drag]) double trailing, SpringDescription spring, double drag)
: _leadingExtent = leading, : _leadingExtent = leading,
_trailingExtent = trailing, _trailingExtent = trailing,
_springDesc = spring, _springDesc = spring,
_drag = drag { _drag = drag {
assert((spring != null && drag != null) || (spring == null && drag == null));
_chooseSimulation(position, velocity, 0.0); _chooseSimulation(position, velocity, 0.0);
} }
......
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