spring can be null drag must not be
This commit is contained in:
@@ -18,12 +18,11 @@ class ScrollSimulation extends SimulationGroup {
|
||||
double _offset = 0.0;
|
||||
|
||||
ScrollSimulation(double position, double velocity, double leading,
|
||||
double trailing, [SpringDescription spring, double drag])
|
||||
double trailing, SpringDescription spring, double drag)
|
||||
: _leadingExtent = leading,
|
||||
_trailingExtent = trailing,
|
||||
_springDesc = spring,
|
||||
_drag = drag {
|
||||
assert((spring != null && drag != null) || (spring == null && drag == null));
|
||||
_chooseSimulation(position, velocity, 0.0);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user