Future ping()

Source

Future ping() {
  var completer = new Completer();
  _pings[_pingId] = completer;
  _sendPort.send({"t": "ping", "i": _pingId});
  _pingId++;
  return completer.future;
}