handle method
Handle available events.
Returns true
if the command is completed, or false
if it needs
more events.
If the method returns true, the command will never be called again.
This method is called when a command reaches the front of the command
queue, and if it returns false
, it's called again every time a new event
becomes available.
Implementation
@override
bool handle(ListQueue<TEvent> eventQueue) {
while (_skipped < skip) {
if (eventQueue.isNotEmpty) {
_skipped++;
eventQueue.removeFirst();
} else {
return false;
}
}
completer.complete(skip);
return true;
}