mergeObservable method

Stream<List<QueryDocumentSnapshot<Map<String, dynamic>>>> mergeObservable(
  1. Iterable<Stream<List<QueryDocumentSnapshot<Map<String, dynamic>>>>> queries
)
inherited

Implementation

Stream<List<QueryDocumentSnapshot<T>>> mergeObservable(
  Iterable<Stream<List<QueryDocumentSnapshot<T>>>> queries,
) {
  final mergedObservable = Rx.combineLatest<List<QueryDocumentSnapshot<T>>,
      List<QueryDocumentSnapshot<T>>>(queries, (originalList) {
    final reducedList = <QueryDocumentSnapshot<T>>[];
    for (final t in originalList) {
      reducedList.addAll(t);
    }
    return reducedList;
  });
  return mergedObservable;
}