volume_controller
다중 플랫폼용 Flutter 볼륨 플러그인으로 시스템 볼륨을 제어합니다.
kurenai7968/volume_controller open-source repository details.
아래는 영문 원문 스냅샷입니다. 최신 내용은 GitHub에서 확인하세요.
Control and observe the system volume on Android, iOS, macOS, Windows, and Linux.
>=3.44.0^3.12.0The iOS plugin uses the scene lifecycle APIs introduced for Flutter plugins in Flutter 3.38.
| Platform | Supported |
|---|---|
| Android | ✅ |
| iOS | ✅ |
| macOS | ✅ |
| Windows | ✅ |
| Linux | ✅ |
showSystemUI is supported on Android and iOS only.0 on every platform:
STREAM_MUSIC mute (isStreamMute / ADJUST_MUTE).0 and unmute restores the previous volume saved by the plugin.isMuted() is volume == 0. setMute(true) sets volume to 0; setMute(false) restores the previous volume saved by the plugin. iOS 26 AVAudioSession.setOutputMuted is not used, because it mutes this app's audio session rather than the system volume.Show or hide the volume system UI. The default value is true. Supported on iOS and Android only.
VolumeController.instance.showSystemUI = true;
Get the current system volume.
double volume = await VolumeController.instance.getVolume();
Set the system volume. The input should be in the range 0.0 to 1.0.
await VolumeController.instance.setVolume(double volume);
Add a listener to monitor system volume changes.
fetchInitialVolume: Send the current volume immediately. Defaults to true.VolumeController.instance.addListener((volume) {
// Do something with the volume
}, fetchInitialVolume: true);
Remove the volume listener.
await VolumeController.instance.removeListener();
Check whether the system is muted.
bool isMuted = await VolumeController.instance.isMuted();
Mute or unmute the system volume.
await VolumeController.instance.setMute(bool mute);
의존성 목록 3 개
{"sdk":"flutter"}{"sdk":"flutter"}^6.0.0사용 목적에 따라 검색하고 개발 활동을 비교한 뒤 원본 저장소에서 요구 사항을 확인하세요.
“A repository is the most basic element of GitHub.”
GitHub Docs — About repositories ↗