For someone who understands Streams in Dart this likely is trivial. I have a List of connections, which are simply document id's that exist in a single collection in firestore.

I cannot use whereIn for my firestore query because it is limited to 10 items. So, I'm trying to loop over each connections id and then using a collection stream with a query to get one document at a time.

The code below does not work. It returns this error:

The method 'add' was called on null.
  Stream<List<SpecialEvents>> upcomingSpecialEventsStream(List connections) {
    if (connections.isEmpty) {
      return Stream.value(null);
    }

    List event;

    connections.forEach((connection) {
      event.add(_service.collectionStream(
        path: FirestorePath.specialEvents(),
        queryBuilder: (query) => query.where(
          'uid',
          isEqualTo: connection,
        ),
        builder: (data, connection) => SpecialEvents.fromMap(data, connection),
      ));
    });

    return event as Stream;
  }