workerEventReceiver method Null safety

void workerEventReceiver(
  1. String id,
  2. Event event
)

Implementation

void workerEventReceiver(String id, Event event) {
  _createdWorkers[id]?.add(event);
}