Test
This is a page about »Test«.
Approach A: The SharedFlow Way
// Often the first choice, but comes with risks
private val _eventFlow = MutableSharedFlow<HomeEvent>(
replay = 0,
extraBufferCapacity = 1
)
val eventFlow = _eventFlow.asSharedFlow()
Approach B: The Channel Way (Recommended)
// Clean, simple, and reliable
private val _eventChannel = Channel<HomeEvent>(Channel.BUFFERED)
val eventChannel = _eventChannel.receiveAsFlow()