mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
spring can be null drag must not be
This commit is contained in:
parent
6c639ee389
commit
66f064eabf
@ -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);
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user