convert<R> method
Convert
each item by applying a function and only emit result that
changed.
Convert
is composition of Map
and Distinct
.
It first transform the items emitted by applying a function, then only emit result that is distinct from previous emitted result.
Implementation
States<R> convert<R>(
R Function(T) convert, {
Equals<R>? equals,
}) {
return observable
.distinctMap<R>(
convert,
equals: equals,
)
.asStates();
}