ClampingScrollSimulation class Null safety

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
hashCode → int
The hash code for this object.
read-onlyinherited
position → double
The position of the particle at the beginning of the simulation.
final
runtimeType → Type
A representation of the runtime type of the object.
read-onlyinherited
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 / writeinherited
velocity → double
The velocity at which the particle is traveling at the beginning of the simulation.
final

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
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited
x(double time) → double
The position of the object in the simulation at the given time.
override

Operators

operator ==(Object other) → bool
The equality operator.
inherited