mergeWith method

Observable<T> mergeWith (Iterable<Stream<T>> streams)

Combines the items emitted by multiple streams into a single stream of items. The items are emitted in the order they are emitted by their sources.

Example

new Observable.timer(1, new Duration(seconds: 10))
    .mergeWith([new Observable.just(2)])
    .listen(print); // prints 2, 1

Implementation

Observable<T> mergeWith(Iterable<Stream<T>> streams) => new Observable<T>(
    new MergeStream<T>(<Stream<T>>[_stream]..addAll(streams)));