ClampingScrollSimulation class

An implementation of scroll physics that matches Android.

See also:

Inheritance

Constructors

ClampingScrollSimulation({@required double position, @required double velocity, double friction: 0.015, Tolerance tolerance: Tolerance.defaultTolerance })
Creates a scroll physics simulation that matches Android scrolling.

Properties

friction double
The amount of friction the particle experiences as it travels. [...]
final
position double
The position of the particle at the beginning of the simulation.
final
velocity double
The velocity at which the particle is traveling at the beginning of the simulation.
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
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
toString() String
Returns a string representation of this object.
inherited

Operators

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