distinctUntilChanged<K> method

Observable<T> distinctUntilChanged<K>({
  1. Map1<T, K>? key,
  2. Predicate2<K, K>? compare,
})

Emits all items emitted by this Observable that are different from the previous one.

Implementation

Observable<T> distinctUntilChanged<K>(
        {Map1<T, K>? key, Predicate2<K, K>? compare}) =>
    DistinctUntilChangedObservable<T, K>(
      this,
      key ?? (value) => value as K,
      compare ?? (a, b) => a == b,
    );