Worker constructor

Worker(
  1. Future<void> worker(),
  2. String type
)

Constructs a new Worker with the provided worker callback and type.

Implementation

Worker(this.worker, this.type);