SpscReceiver<T>.fromTransferable constructor

SpscReceiver<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 SpscReceiver.fromTransferable(Map<String, Object?> data) =>
    SpscReceiver._(-1, unpackPort(data['port']!),
        metricsId: data['metricsId'] as String?);