receivePort property

ReceivePort? receivePort

Get a defualt receivePort

Implementation

static ReceivePort? get receivePort {
  if (_receivePort == null) {
    _receivePort = ReceivePort();
    // remove the old one at first.
    IsolateNameServer.removePortNameMapping(SEND_PORT_NAME);
    IsolateNameServer.registerPortWithName(
        _receivePort!.sendPort, SEND_PORT_NAME);
  }
  return _receivePort;
}