androidx.compose.ui.node

ObserverModifierNode

Interface · from org.jetbrains.compose.ui:ui:1.12.2

No hand-written docs yet.

Modifier.Nodes that implement ObserverNode can provide their own implementation of onObservedReadsChanged that will be called in response to changes to snapshot objects read within an observeReads block.

interface ObserverModifierNode : DelegatableNode

Is a

Functions

onObservedReadsChanged

fun onObservedReadsChanged()

This callback is called when any values that are read within the observeReads block change. It is called after the snapshot is committed. onObservedReadsChanged is called on the UI thread, and only called once in response to snapshot observation. To continue observing further updates, you need to call observeReads again.

Library docs

Modifier.Nodes that implement ObserverNode can provide their own implementation of onObservedReadsChanged that will be called in response to changes to snapshot objects read within an observeReads block.