distinct method

  1. @override
Observable<T> distinct(
  1. [bool equals(
    1. T previous,
    2. T next

WARNING: More commonly known as distinctUntilChanged in other Rx implementations. Creates an Observable where data events are skipped if they are equal to the previous data event.

The returned stream provides the same events as this stream, except that it never provides two consecutive data events that are equal.

Equality is determined by the provided equals method. If that is omitted, the '==' operator on the last provided data element is used.

The returned stream is a broadcast stream if this stream is. If a broadcast stream is listened to more than once, each subscription will individually perform the equals test.

Interactive marble diagram


Observable<T> distinct([bool equals(T previous, T next)]) =>