/// Audio device types detected via platform channel. enum TipoDispositivo { /// Built-in speaker — id: "builtin_speaker" altavozInterno, /// Wired headset or headphones — id: "wired_headset" auricularesCable, /// Bluetooth A2DP device — id: `"bt_a2dp:"` bluetoothA2dp, /// USB audio device — id: `"usb_headset:
"` usbAudio, /// Unrecognized device type. desconocido, } /// Represents an audio output device detected on the current platform. /// /// Equality is based on [id] only so that two instances referring to the /// same physical device compare as equal regardless of display name. class DispositivoAudio { final String id; final TipoDispositivo tipo; final String nombre; const DispositivoAudio({ required this.id, required this.tipo, required this.nombre, }); @override bool operator ==(Object other) { if (identical(this, other)) return true; if (other is! DispositivoAudio) return false; return id == other.id; } @override int get hashCode => id.hashCode; @override String toString() => 'DispositivoAudio(id: $id, tipo: $tipo, nombre: $nombre)'; }