debounceDistinct method

Stream<T> debounceDistinct(
  1. Duration duration, {
  2. bool equals(
    1. T previous,
    2. T next
    )?,
})

Debounces this stream AND suppresses consecutive equal values.

Debounce runs first (so only the surviving value of each burst is tested), then distinct drops it if it equals the previously emitted value. Pass equals for a custom equality; otherwise == is used. Useful for a watch stream that re-emits identical snapshots after unrelated writes. Audited: 2026-06-12 11:26 EDT

Implementation

Stream<T> debounceDistinct(
  Duration duration, {
  bool Function(T previous, T next)? equals,
}) => debounceStream(this, duration).distinct(equals);