MethodChannelAudioOutputPicker class

An implementation of AudioOutputPickerPlatform that uses method channels with built-in timeout guards and exception control.

Inheritance

Properties

audioDeviceEventStream Stream<Map<String, dynamic>>
Stream of raw device / route change events from the native platform.
no setteroverride
eventChannel EventChannel
The event channel used to receive audio device and route changes.
final
hashCode int
The hash code for this object.
no setterinherited
methodChannel MethodChannel
The method channel used to interact with the native platform.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

checkBluetoothPermission() Future<bool>
Checks if required bluetooth permissions (e.g. Bluetooth Connect on Android 12+) are granted.
override
checkMicrophonePermission() Future<bool>
Checks if microphone recording permission is granted.
override
getAvailableAudioOutputs() Future<List<AudioOutputDevice>>
Gets the list of available audio output devices.
override
getAvailableMicrophones() Future<List<AudioInputDevice>>
Gets the list of available microphone / audio input devices.
override
getCurrentAudioOutput() Future<AudioOutputDevice?>
Gets the currently active audio output device, or null if none/unknown.
override
getCurrentMicrophone() Future<AudioInputDevice?>
Gets the currently active microphone / audio input device, or null if none/unknown.
override
getPlatformVersion() Future<String?>
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
requestBluetoothPermission() Future<bool>
Requests required bluetooth permissions directly without 3rd party plugins.
override
requestMicrophonePermission() Future<bool>
Requests microphone recording permission directly.
override
selectAudioOutput(String deviceId) Future<bool>
Selects the audio output device with the given deviceId.
override
selectMicrophone(String deviceId) Future<bool>
Selects the microphone / audio input device with the given deviceId.
override
toString() String
A string representation of this object.
inherited

Operators

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

Constants

methodTimeout → const Duration
Timeout duration applied to platform method invocations to prevent UI hanging / ANRs.