volume_controller
3.7.1, released 2 months ago by an unverified publisher
Control and observe system volume on Android, iOS, macOS, Windows, and Linux.
What it does
Allows Flutter apps to read and modify the device's system volume level, check and alter mute states, show or hide system volume UI, and listen to external volume changes across multiple platforms.
AI-written summary of version 3.7.1, based on the package's README and metadata. Report an inaccuracy
Use it when
- You are building a custom media player or audio-centric app that needs direct system volume integration.
- You need to detect hardware volume button changes or external volume modifications in real-time.
Skip it when
- You only need in-app volume control isolated to an audio playback instance rather than the hardware/system volume.
Strengths
- Cross-platform support spanning Android, iOS, macOS, Windows, and Linux.
- Provides both programmatic volume setting/getting and event listening for volume changes.
- Allows showing or hiding the native system volume UI HUD on mobile platforms.
Weaknesses
- Mute semantics and implementation differ across operating systems.
- iOS simulator does not support system volume control, requiring real device testing.
Setup
- Kind
- Plugin (native code)
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 0
Requires Flutter >=3.44.0 and Dart ^3.12.0. iOS testing must be done on a physical device.
VolumeController.instance.addListener((volume) {
// Do something with the volume
}, fetchInitialValue: true);
double volume = await VolumeController.instance.getVolume();
await VolumeController.instance.setVolume(0.5);Alternatives
Packages that do the same job and could replace volume_controller.
- audio_session
Configure how your app interacts with the device audio session and routing without directly manipulating master system volume controls.
76Compare
Works with
Packages commonly used together with volume_controller: ones it builds on, ones built on it, and its own family.