setVolume method

Future<void> setVolume(
  1. double volume
)
inherited

Sets the audio volume of this.

volume indicates a value between 0.0 (silent) and 1.0 (full volume) on a linear scale.

Implementation

Future<void> setVolume(double volume) async {
  value = value.copyWith(volume: volume.clamp(0.0, 1.0));
  await _applyVolume();
}