childParentData

abstract fun <D : Any> childParentData(index: Int, key: ParentDataKey<D>): D?(source)

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

The query does not measure or place the child and does not mutate retained measurement or placement state. A provider is read only after the complete consecutive chain has been scanned.

Return

the innermost matching provider value, or null when no provider uses key.

Parameters

index

the absolute direct-child index.

key

the referential parent-data token to find.

Throws

when index is outside the direct-child range.

when the callback scope is no longer active or the child scope rejects the access.

when the selected provider fails; the original failure is propagated unchanged.