observeScreenTileBroadcastChannel

inline fun <T : ScreenTilesBroadcastData> TileSchema.observeScreenTileBroadcastChannel(filterByTileId: Boolean = true, crossinline action: suspend (value: T) -> Unit)

Subscribes this tile to its screen's own broadcast channel (reached via LocalScreenTilesBroadcastChannel), running action for every emitted ScreenTilesBroadcastData of type T — the composable-side counterpart of EventRunningScope.broadcastData, and the mechanism a tile's own renderer uses to react to a screen-scoped command addressed to it (scroll commands, overlay open/close, etc.).

Parameters

filterByTileId

when true (the default), only values whose tileId equals this tile's own id reach action — the usual case, since most broadcasts are addressed to one specific tile. Pass false for a tile that should react to every T on the channel regardless of which tile it was addressed to (e.g. SystemBroadcastListener, which listens for events by broadcastId, not by tileId).

action

run for each matching broadcast value.