sendEvent

protected fun sendEvent(obj: Any)(source)

Enqueues a one-time event for the UI layer to consume.

Safe to call from any thread or coroutine context. Events are buffered and delivered in emission order.

sendEvent(ProfileEvent.ShowToast("Profile saved"))

// Navigation events are intercepted automatically by KScreen:
sendEvent(AppScreen.Home)

Parameters

obj

The event object to deliver. Can be any type, including a KDestination for automatic navigation handling in KScreen.