ClampingScrollSimulation constructor

ClampingScrollSimulation({
  1. required double position,
  2. required double velocity,
  3. double friction = 0.015,
  4. Tolerance tolerance = Tolerance.defaultTolerance,
})

Creates a scroll physics simulation that aligns with Android scrolling.

Implementation

ClampingScrollSimulation({
  required this.position,
  required this.velocity,
  this.friction = 0.015,
  super.tolerance,
}) {
  _duration = _flingDuration();
  _distance = _flingDistance();
}