LightDynamics constructor
LightDynamics({})
Creates a LightDynamics object.
Implementation
LightDynamics({
required this.status,
required this.statusValues,
required double speed,
required this.speedValid,
int? durationMilliseconds,
}) : assert(status.isEmpty || Validators.isValidValue(status, statusValues),
'`statusValues` does not contain "$status"'),
assert(Validators.isUnitInterval(speed),
"`speed` must be between 0 and 1 (inclusive)"),
assert(durationMilliseconds == null || durationMilliseconds >= 0,
"`durationMilliseconds` must be greater than 0"),
_originalSpeed = speed,
_speed = speed,
_originalDurationMilliseconds = durationMilliseconds;