setSpeed method
Sets the speed of this
.
speed
indicates a value between 0.0 and 2.0 on a linear scale.
Implementation
Future<void> setSpeed(double speed) async {
final double previousSpeed = value.speed;
try {
value = value.copyWith(speed: speed);
await _applySpeed();
} catch (exception) {
value = value.copyWith(speed: previousSpeed);
rethrow;
}
}