get method

VoidCallback get(
  1. String soul, [
  2. TTMsgCb? cb,
  3. String? msgId
])

Request node data

@param soul identifier of node to request @param cb callback for response messages @param msgId optional unique message identifier @returns a function to cleanup listeners when done

Implementation

VoidCallback get(String soul, [TTMsgCb? cb, String? msgId]) {
  String id = msgId ?? generateMessageId();

  events.get.trigger(TTGet(cb: cb, msgId: msgId, soul: soul));

  return () => events.off.trigger(id);
}