WorkerDelegate<Q, R> constructor

const WorkerDelegate<Q, R>({
  1. required Object key,
  2. required DefaultDelegate<Q, R> defaultDelegate,
  3. required JsDelegate jsDelegate,
})

Creates a new WorkerDelegate that consists of its key, defaultDelegate for when running on Dart VM, and jsDelegate for when running on Web.

Implementation

const factory WorkerDelegate({
  required Object key,
  required DefaultDelegate<Q, R> defaultDelegate,
  required JsDelegate jsDelegate,
}) = _AdaptiveWorkerDelegate<Q, R>;