peek property

Future<T> peek

Looks at the next (yet unrequested) event from the stream.

Like next except that the event is not consumed. If the next event is an error event, it stays in the queue.

Implementation

Future<T> get peek {
  _checkNotClosed();
  var nextRequest = _PeekRequest<T>();
  _addRequest(nextRequest);
  return nextRequest.future;
}