setVolume method
Sets playback gain, clamped to 0–1.
Implementation
Future<void> setVolume(double volume) async {
final clamped = volume.clamp(0.0, 1.0).toDouble();
await _send(
'setVolume',
(backend, handle) => backend.setVolume(handle, clamped),
);
_setValue = _value.copyWith(volume: clamped);
}