LeadSimulation class final
Evaluates inner one frame ahead, so the first frame after touch-down already moves (motion-flutter §1.4).
A ticker started outside a frame (pointer events arrive between frames)
evaluates its first frame at elapsed = 0; without the lead the press
would only start moving on the second frame.
- Inheritance
-
- Object
- Simulation
- LeadSimulation
Constructors
- LeadSimulation(Simulation inner, double lead)
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- inner → Simulation
-
The simulation being led.
final
- lead → double
-
Seconds to evaluate ahead (one frame:
1 / refreshRate).final - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- 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".
getter/setter pairinherited
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 nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
override
-
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