getVCardFor method
Implementation
Future<VCard> getVCardFor(Jid jid) {
var completer = Completer<VCard>();
var iqStanza =
IqStanza(AbstractStanza.getRandomId(), IqStanzaType.GET);
iqStanza.fromJid = _connection.fullJid;
iqStanza.toJid = jid;
var vCardElement = XmppElement();
vCardElement.name = 'vCard';
vCardElement.addAttribute(XmppAttribute('xmlns', 'vcard-temp'));
iqStanza.addChild(vCardElement);
_myUnrespondedIqStanzas[iqStanza.id!] = Tuple2(iqStanza, completer);
_connection.writeStanza(iqStanza);
return completer.future;
}