onAudioDeviceStateChanged property
void Function(String deviceId, MediaDeviceType deviceType, MediaDeviceStateType deviceState)?
onAudioDeviceStateChanged
final
Occurs when the audio device state changes.
Indicates that the system audio device state has changed, such as when a headset is unplugged. This method is only applicable to Windows and macOS.
deviceIdThe device ID.deviceTypeThe device type definition. See MediaDeviceType.deviceStateThe device state. See MediaDeviceStateType.
Implementation
final void Function(String deviceId, MediaDeviceType deviceType,
MediaDeviceStateType deviceState)? onAudioDeviceStateChanged;