setSpeed method Null safety

Future<void> setSpeed(
  1. double speed

Sets the playback speed to use when playing is true, where 1.0 is normal speed. Note that values in excess of 1.0 may result in stalls if the playback speed is faster than the player is able to downloaded the audio.


Future<void> setSpeed(final double speed) async {
  if (_disposed) return;
  _playbackEvent = _playbackEvent.copyWith(
    updatePosition: position,
  await (await _platform).setSpeed(SetSpeedRequest(speed: speed));