merge<T> method

Stream<T> merge <T>(
  1. Iterable<Stream<T>> streams
)

Flattens the items emitted by the given streams into a single Stream sequence.

Interactive marble diagram

Example

Rx.merge([
  Rx.timer(1, Duration(days: 10)),
  Stream.value(2)
])
.listen(print); // prints 2, 1

Implementation

static Stream<T> merge<T>(Iterable<Stream<T>> streams) =>
    MergeStream<T>(streams);