RealVolume class
Constructors
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
-
onRingerModeChanged
→ Stream<
RingerMode> -
A listener that triggers a RingerMode event when device's
ringer mode has changed.
no setter
-
onVolumeChanged
→ Stream<
VolumeObj> -
A listener that triggers a VolumeObj event when volumeLevel
of any streamType has changed.
no setter
Static Methods
-
getAudioMode(
) → Future< AudioMode?> -
[Android only]
Returns current audioMode. -
getCurrentVol(
StreamType? streamType) → Future< double?> -
Returns current volume for a
streamType
in percentage(from 0.0 to 1.0). -
getMaxVol(
StreamType? streamType) → Future< int?> -
Returns max volume for a
streamType
-
getMinVol(
StreamType? streamType) → Future< int?> -
Returns min volume for a
streamType
-
getRingerMode(
) → Future< RingerMode?> - Returns current ringerMode.
-
isPermissionGranted(
) → Future< bool?> -
[Android only]
Returns the status of theDo not Disturb access
permission for this app. -
openDoNotDisturbSettings(
) → Future< bool?> -
[Android only]
Opens Do not Disturb access permission applications list. -
setAudioMode(
AudioMode audioMode) → Future< bool?> -
[Android only]
Changes theaudioMode
of the device. -
setRingerMode(
RingerMode ringerMode, {bool redirectIfNeeded = true}) → Future< bool?> -
[Android only]
Changes theringerMode
of the device. -
setVolume(
double volumeLevel, {StreamType? streamType = StreamType.MUSIC, bool showUI = false}) → Future< bool?> -
Changes the
volumeLevel
of the device for a specificstreamType
. You can also open the default device ui usingshowUI
.