addTask method

void addTask(
  1. Task<T> task
)

Adds a pre-configured Task to the end of the queue.

Throws an AssertionError if the batch is currently executing.

Implementation

void addTask(Task<T> task) {
  _ifNotExecuting(() => tasks.add(task));
}