EffectEmitter

class EffectEmitter<E : Any>(scope: CoroutineScope)

One-shot effect delivery with no dependency on androidx.lifecycle.ViewModel.

Wraps a buffered Channel the same way BaseViewModel.emitEffect does, but takes only a CoroutineScope — for consumers whose ViewModel-equivalent isn't built on androidx.lifecycle.ViewModel (e.g. a hand-rolled presenter). Pure coroutines, no platform dependency, so it compiles on every target this library declares.

Constructors

Link copied to clipboard
constructor(scope: CoroutineScope)

Properties

Link copied to clipboard
val effects: Flow<E>

Functions

Link copied to clipboard
fun emit(effect: E)

Deliver once to the active collector.