addAllTasks method
Adds multiple Task objects to the end of the queue.
Throws an AssertionError if the batch is currently executing.
Implementation
@pragma('vm:prefer-inline')
void addAllTasks(Iterable<Task<T>> newTasks) {
assert(isNotExecuting, 'Cannot modify while tasks are executing.');
if (isNotExecuting) tasks.addAll(newTasks);
}