add<T> method Null safety

Future<T> add<T>(
  1. Function job
)

add async job to queue

Implementation

Future<T> add<T>(Function job) {
  var completer = Completer<T>();
  this._queue.add(_Item(completer, job));
  this._check();
  return completer.future;
}