ClampingScrollSimulation constructor
Creates a scroll physics simulation that matches Android scrolling.
Implementation
ClampingScrollSimulation({
@required this.position,
@required this.velocity,
this.friction = 0.015,
Tolerance tolerance = Tolerance.defaultTolerance,
}) : assert(_flingVelocityPenetration(0.0) == _initialVelocityPenetration),
super(tolerance: tolerance) {
_duration = _flingDuration(velocity);
_distance = (velocity * _duration / _initialVelocityPenetration).abs();
}