onAudioDeviceStateChanged property
void Function(String deviceId, MediaDeviceType deviceType, MediaDeviceStateType deviceState)?
onAudioDeviceStateChanged
final
Occurs when the audio device state changes.
This callback notifies the application that the system's audio device state is changed. For example, a headset is unplugged from the device. This method is for Windows and macOS only.
deviceIdThe device ID.deviceTypeThe device type. See MediaDeviceType.deviceStateThe device state. See MediaDeviceStateType.
Implementation
final void Function(String deviceId, MediaDeviceType deviceType,
MediaDeviceStateType deviceState)? onAudioDeviceStateChanged;