lookAhead method
Look at the next count
data events without consuming them.
Works like take except that the events are left in the queue.
If one of the next count
events is an error, the returned future
completes with this error, and the error is still left in the queue.
Implementation
Future<List<T>> lookAhead(int count) {
if (count < 0) throw new RangeError.range(count, 0, null, "count");
if (!_isClosed) {
var request = new _LookAheadRequest<T>(count);
_addRequest(request);
return request.future;
}
throw _failClosed();
}