BouncingScrollSimulation class

An implementation of scroll physics that matches iOS.

See also:

Inheritance

Constructors

BouncingScrollSimulation({@required double position, @required double velocity, @required double leadingExtent, @required double trailingExtent, @required SpringDescription spring, Tolerance tolerance: Tolerance.defaultTolerance })
Creates a simulation group for scrolling on iOS, with the given parameters. [...]

Properties

leadingExtent double
When x falls below this value the simulation switches from an internal friction model to a spring model which causes x to "spring" back to leadingExtent.
final
spring SpringDescription
The spring used used to return x to either leadingExtent or trailingExtent.
final
trailingExtent double
When x exceeds this value the simulation switches from an internal friction model to a spring model which causes x to "spring" back to trailingExtent.
final
hashCode int
The hash code for this object. [...]
read-only, inherited
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
tolerance Tolerance
How close to the actual end of the simulation a value at a particular time must be before isDone considers the simulation to be "done". [...]
read / write, inherited

Methods

dx(double time) double
The velocity of the object in the simulation at the given time.
override
isDone(double time) bool
Whether the simulation is "done" at the given time.
override
toString() String
Returns a string representation of this object.
override
x(double time) double
The position of the object in the simulation at the given time.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited

Operators

operator ==(dynamic other) bool
The equality operator. [...]
inherited

Constants

maxSpringTransferVelocity → const double
The maximum velocity that can be transferred from the inertia of a ballistic scroll into overscroll.
5000.0