TriggerBuffer

internal class TriggerBuffer<T>(trigger: Flow<Boolean>, scope: CoroutineScope)

A buffer that will collect items and emit list of all items buffered since last emitted list only when trigger emits true.

Constructors

Link copied to clipboard
constructor(trigger: Flow<Boolean>, scope: CoroutineScope)

Functions

Link copied to clipboard
suspend fun add(value: T)
Link copied to clipboard
fun observe(): Flow<List<T>>