Skip to content
pubscout

real_volume

1.0.9, released 2 years ago by an unverified publisher

Flutter plugin to get and set system volume, ringer and audio modes on Android and iOS.

$ flutter pub add real_volume
Source repository

What it does

Provides APIs to read and change volume levels for different stream types, query and modify ringer and audio modes, and listen for changes. Includes helpers for Do Not Disturb permission handling on Android and limited iOS support.

AI-written summary of version 1.0.9, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You need to read or adjust the device's volume or ringer mode programmatically
  • You want to react to volume or ringer changes in real time
  • Your app must manage Do Not Disturb access on Android

Skip it when

  • You need full audio playback capabilities or advanced audio processing
  • You require cross‑platform volume UI components
  • You need a pure Dart solution without native code

Strengths

  • Simple API for common volume and ringer tasks
  • Supports listeners for real‑time changes
  • Works on both Android and iOS

Weaknesses

  • iOS stream type is ignored, limiting granularity
  • Some functions (e.g., set audio mode) are incomplete
  • Requires native permission handling for DND

Setup

Kind
Plugin (native code)
Effort
Medium
Code generation
No
Direct dependencies
0

Add <uses-permission android:name="android.permission.ACCESS_NOTIFICATION_POLICY"/> to AndroidManifest and request Do Not Disturb access at runtime; iOS listeners require careful subscription order.

import 'package:real_volume/real_volume.dart';

void main() async {
  double? vol = await RealVolume.getCurrentVol(StreamType.MUSIC);
  print('Music volume: $vol');
  RealVolume.onVolumeChanged.listen((e) => print('Changed: ${e.volumeLevel}'));
}

Alternatives

Packages that do the same job and could replace real_volume.

  • audio_session

    Manages audio focus and mode with a pure‑Dart API and fewer native permissions