Volume class

You can control VoiceCall, System, Ringer, Media, Alarm, Notification volume and get the max possible volumes for the respective.

Call the initAudioStream(AudioManager audioManager) function in initState()

To make sure the setVol({int androidVol = 0, double iOSVol = 0.0, bool showVolumeUI = true}), getMaxVol, and getVol control

The volume passed as the parameter to the initAudioStream(AudioManager audioManager) function.

Constructors

Volume()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Properties

getMaxVol Future
Returns an int which is the Max Possible volume for the selected AudioManager Stream same as that passed in the controlVolume ( AudioManager ) function.
no setter
getVol Future
Returns an int which is the current volume for the selected AudioManager Stream same as that passed in the controlVolume ( AudioManager ) function.
no setter

Static Methods

initAudioStream(AudioManager audioManager) Future<void>
Pass any AudioManager Stream as a parameter to this function and the volume buttons and setVol (...) function will control that particular volume.
setVol({int androidVol = 0, double iOSVol = 0.0, bool showVolumeUI = true}) Future<int>
Call this function with an integer value to set the volume of the selected. OPTIONAL PARAMETER ShowVolumeUI showVolumeUI to show or hide system Volume UI while changing the volume. AudioManager stream but value should be less then value returned by getMaxVol getter