in lib/src/stream_queue.dart [581:597]
void commit(StreamQueue<T> queue) {
_assertActive();
if (!_queues.contains(queue)) {
throw ArgumentError("Queue doesn't belong to this transaction.");
} else if (queue._requestQueue.isNotEmpty) {
throw StateError("A queue with pending requests can't be committed.");
}
_committed = true;
// Remove all events from the parent queue that were consumed by the
// child queue.
for (var j = 0; j < queue.eventsDispatched; j++) {
_parent._eventQueue.removeFirst();
}
_done();
}