ForkJoinStream<T, R> constructor

ForkJoinStream<T, R>(
  1. Iterable<Stream<T>> streams,
  2. R combiner(
    1. List<T> values

Constructs a Stream that awaits the last values of the Streams in streams, then calls the combiner to emit an event of type R. After this event, the Stream closes.


  Iterable<Stream<T>> streams,
  R Function(List<T> values) combiner,
)   : assert(streams != null && streams.every((s) => s != null),
          'streams cannot be null'),
      assert(streams.isNotEmpty, 'provide at least 1 stream'),
      assert(combiner != null, 'must provide a combiner function'),
      super(_buildController(streams, combiner).stream);