Composite simulation for scrollable interfaces.

Simulates kinetic scrolling behavior between a leading and trailing boundary. Friction is applied within the extents and a spring action is applied at the boundaries. This simulation can only step forward.

Inheritance

Constructors

ScrollSimulation({double position, double velocity, double leadingExtent, double trailingExtent, SpringDescription spring, double drag, TargetPlatform platform })

Creates a ScrollSimulation with the given parameters.

Properties

currentIntervalOffset → double

read-only
currentSimulation → Simulation

read-only
hashCode → int

Get a 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

Operators

operator ==(other) → bool

The equality operator.

inherited

Methods

step(double time) → bool

Called when a significant change in the interval is detected. Subclasses must decide if the current simulation must be switched (or updated).

toString() → String

Returns a string representation of this object.

dx(double time) → double

The velocity of the object in the simulation at the given time.

inherited
isDone(double time) → bool

Whether the simulation is "done" at the given time.

inherited
noSuchMethod(Invocation invocation) → dynamic

Invoked when a non-existent method or property is accessed.

inherited
x(double time) → double

The position of the object in the simulation at the given time.

inherited