MeasureScope

Direct-child measurement scope for one parent measurement pass.

The scope is owned by the MeasureNode.measure callback and is valid only until that callback returns. Every access must use the tree's owner thread. Access after the callback or from another thread fails. Each direct child can be measured at most once through this scope. An index outside the direct-child range or a second measurement of the same child throws. The tree is poisoned once pipeline work has started only when that exception escapes the owning measure callback.

Properties

Link copied to clipboard
abstract val childCount: Int

The number of direct retained children.

Functions

Link copied to clipboard
abstract fun <D : Any> childParentData(index: Int, key: ParentDataKey<D>): D?

Returns the current parent-data value supplied by one direct child's modifier chain.

Link copied to clipboard
abstract fun measureChild(index: Int, constraints: Constraints): IntSize

Measures one direct child exactly once.