MpscReceiver<T>.fromTransferable constructor

MpscReceiver<T>.fromTransferable(
  1. Map<String, Object?> data
)

Reconstructs a remote-only receiver from a transferable representation.

Use with toTransferable to transfer a receiver across Web Workers or Isolates. The reconstructed receiver always uses the remote path.

Implementation

factory MpscReceiver.fromTransferable(Map<String, Object?> data) =>
    MpscReceiver._(-1, unpackPort(data['port']!),
        metricsId: data['metricsId'] as String?);