Package-level declarations

Types

Link copied to clipboard

These interfaces can be used to mark object you emit to a Flow as a special value.

Functions

Link copied to clipboard
inline suspend fun <T> Flow<T>.collectImportant(collector: FlowCollector<T>)

Collects all elements not implementing SpecialFlowValue.NotImportant from a Flow.

Link copied to clipboard
inline suspend fun <T> Flow<T>.collectImportantUntilLast(includeLast: Boolean = true, collector: FlowCollector<T>)

Collects all elements not implementing SpecialFlowValue.NotImportant from a Flow up to the first SpecialFlowValue.Last received.

Link copied to clipboard
inline suspend fun <T> Flow<T>.collectUntilLast(includeLast: Boolean = true, collector: FlowCollector<T>)

Collects all elements from a Flow up to the first SpecialFlowValue.Last received.

Link copied to clipboard
inline fun <T> Flow<T>.filterOnlyImportant(): Flow<T>

Filters out all values marked as SpecialFlowValue.NotImportant from a given Flow

Link copied to clipboard
suspend fun <T> MutableSharedFlow<T>.onCollectionEvent(onEvent: suspend MutableSharedFlow<T>.(SharedFlowCollectionEvent) -> Unit)

Calls back with events in the following order:

Link copied to clipboard
fun <T> Flow<T>.takeUntilLast(includeLast: Boolean = true): Flow<T>

Transforms a Flow to emit only up to the first SpecialFlowValue.Last received.