setVolume method Null safety

Future<void> setVolume(
  1. double volume
)

Sets the volume of this player, where 1.0 is normal volume.

Implementation

Future<void> setVolume(final double volume) async {
  if (_disposed) return;
  _volumeSubject.add(volume);
  await (await _platform).setVolume(SetVolumeRequest(volume: volume));
}