Package-level declarations

Types

Link copied to clipboard
Link copied to clipboard
data class EventCallback<T : Any>

Represent an event callback for an EventReceiver.

Link copied to clipboard
@API(status = API.Status.EXPERIMENTAL, since = "5.0.0")
open class FlowBus

This class holds all state flows and handles event posting. You can use the Koin singleton that is just plain instance of this class or create your own implementation.

Link copied to clipboard
open class RendezvousStateFlow<T>(initialValue: T) : MutableStateFlow<T>

A simple wrapper for waiting for an event to be fully processed by the listeners.

Functions

Link copied to clipboard
inline fun <T : Any> FlowBus.dropEvent()
Link copied to clipboard
inline fun <T : Any> FlowBus.getFlow(): Flow<T>
Link copied to clipboard
inline fun <T : Any> FlowBus.getLastEvent(): T?
Link copied to clipboard

A variant of subscribe that uses an instance of EventCallback as callback.

inline fun <T : Any> EventReceiver.subscribe(priority: Priority = Priority.DEFAULT, ignoreCancelled: Boolean = false, skipRetained: Boolean = false, noinline callback: suspend T.() -> Unit): EventReceiver

Simplified EventReceiver.subscribeTo for Kotlin. Type of event is automatically inferred from callback parameter type.

Link copied to clipboard
inline fun <T : Any> EventReceiver.subscribeFlow(priority: Priority = Priority.DEFAULT, ignoreCancelled: Boolean = false, skipRetained: Boolean = false): Flow<T>
Link copied to clipboard
inline fun <T : Any> EventReceiver.unsubscribe()