dequeueAll method
Remove and return all commands from the queue.
Implementation
List<QueuedCommand> dequeueAll() {
if (_commandQueue.isEmpty) return [];
final commands = List.of(_commandQueue);
_commandQueue.clear();
_notifySubscribers();
for (final _ in commands) {
_logOperation(QueueOperation.dequeue);
}
return commands;
}