observeSystemBroadcastChannel

fun observeSystemBroadcastChannel(key: Any?, action: suspend (value: SystemBroadcastData) -> Unit)

Subscribes to the app-wide SystemBroadcastChannel (resolved via Koin), running action for every published SystemBroadcastData — the composable-side counterpart of BroadcastToSystem, and the mechanism behind SystemBroadcastListener's OnSystemBroadcast(broadcastId) trigger, reaching across screens rather than being scoped to one.

Parameters

key

restarts the underlying subscription whenever it changes, the same as any LaunchedEffect key.

action

run for each published value.