sequenceEqual<A, B> method

Observable<bool> sequenceEqual<A, B>(
  1. Stream<A> stream,
  2. Stream<B> other,
  3. {bool equals(
    1. A a,
    2. B b
    )}
)

Determine whether two Observables emit the same sequence of items. You can provide an optional equals handler to determine equality.

Interactive marble diagram

Example

Observable.sequenceEqual([
  Stream.fromIterable([1, 2, 3, 4, 5]),
  Stream.fromIterable([1, 2, 3, 4, 5])
])
.listen(print); // prints true

Implementation

static Observable<bool> sequenceEqual<A, B>(Stream<A> stream, Stream<B> other,
        {bool equals(A a, B b)}) =>
    Observable(SequenceEqualStream<A, B>(stream, other, equals: equals));