setAudioDeviceChangeListener method
- void listener(
- MicrophoneDeviceInfo? selectedDevice,
- List<
MicrophoneDeviceInfo> devices
Calls listener whenever the audio route changes — a headset or
Bluetooth device connects or disconnects — with the device now in use
and every one available. Pass null to stop.
Implementation
void setAudioDeviceChangeListener(
void Function(MicrophoneDeviceInfo? selectedDevice,
List<MicrophoneDeviceInfo> devices)?
listener,
) =>
_audioDeviceListener = listener;