distinctUntilChangedBy

fun <T, K> Flow<T>.distinctUntilChangedBy(keySelector: (T) -> K): Flow<T>(source)

Returns flow where all subsequent repetitions of the same key are filtered out, where key is extracted with keySelector function.

Note that repeated application of distinctUntilChanged operator with the same parameter has no effect.