lookAhead method Null safety

Future<List<T>> lookAhead(
  1. int count

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.


Future<List<T>> lookAhead(int count) {
  RangeError.checkNotNegative(count, 'count');
  var request = _LookAheadRequest<T>(count);
  return request.future;