getSelfVCard method

Future<VCard> getSelfVCard()

Implementation

Future<VCard> getSelfVCard() {
  var completer = Completer<VCard>();
  var iqStanza =
      IqStanza(AbstractStanza.getRandomId(), IqStanzaType.GET);
  iqStanza.fromJid = _connection.fullJid;
  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;
}