distinctValue method

  1. @Deprecated("Use ToStateStreamExtension.toStateStream from 'rxdart_ext' package instead. This package is deprecated!")
DistinctValueStream<T> distinctValue(
  1. T value, {
  2. bool equals(
    1. T p1,
    2. T p2
    )?,
})

Convert this Stream to a DistinctValueStream.

Returned stream acts like Stream.distinct except it provides seed value used to check for equality, and synchronous access to the last emitted item.

Data events are skipped if they are equal to the previous data event. Equality is determined by the provided equals method. If that is omitted, the '==' operator on the last provided data element is used.

This stream is a single-subscription stream.

Implementation

@Deprecated(
    "Use ToStateStreamExtension.toStateStream from 'rxdart_ext' package instead. This package is deprecated!")
DistinctValueStream<T> distinctValue(
  T value, {
  bool Function(T p1, T p2)? equals,
}) =>
    toStateStream(value, equals: equals);