SimulationBuildData class

Runtime context passed to CueMotion.build when constructing a simulation.

Every field describes the state of the animation at the moment it starts — or restarts after an interruption. CueMotion implementations use these values to produce a CueSimulation with the correct start point, end point, direction, and initial velocity.

Use the named constructors SimulationBuildData.forward and SimulationBuildData.reverse for the common case of a full run.

Constructors

SimulationBuildData({required bool forward, required double startValue, int phase = 0, int? endPhase, double? velocity, double? startProgress, double? endValue})
Creates a SimulationBuildData with the given configuration.
const
SimulationBuildData.forward({int phase = 0, int? endPhase, double startValue = 0.0, double? velocity, double? startProgress, double? endValue})
A forward run starting from startValue (defaults to 0.0).
const
SimulationBuildData.reverse({int phase = 0, int? endPhase, double startValue = 1.0, double? velocity, double? startProgress, double? endValue})
A reverse run starting from startValue (defaults to 1.0).
const

Properties

endPhase int?
The last phase that should play before the simulation stops.
final
endValue double
The value the simulation should reach. Defaults to 1.0 when forward is true, 0.0 when false. The end value for the simulation.
no setter
forward bool
Whether the animation is travelling toward 1.0 (true) or toward 0.0 (false).
final
hashCode int
The hash code for this object.
no setterinherited
phase int
The active phase index within a multi-phase motion.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
startProgress double?
The progress fraction at which the simulation begins, if the animation was interrupted mid-way.
final
startValue double
The value the simulation starts from, in the 0.0–1.0 range.
final
velocity double?
The initial velocity to hand off to the simulation, in units per second.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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