interface PrecomposedSlotHandle
Instance of this interface is returned by precompose function.
Properties
val placeablesCount: Int
The amount of placeables composed into this slot.
Functions
dispose
fun dispose()
This function allows to dispose the content for the slot which was precomposed previously via precompose.
If this slot was already used during the regular measure pass via SubcomposeMeasureScope.subcompose this function will do nothing.
This could be useful if after the future calculations this item is not anymore expected to be used during the measure pass anytime soon.
premeasure
fun premeasure(index: Int, constraints: Constraints)
Performs synchronous measure of the placeable at the given index.
Parameters
| index | the placeable index. Should be smaller than placeablesCount. |
| constraints | Constraints to measure this placeable with. |
traverseDescendants
fun traverseDescendants(key: Any?, block: (TraversableNode) -> TraverseDescendantsAction)
Conditionally executes block for each Modifier.Node of this Composition that is a TraversableNode with a matching key.
See androidx.compose.ui.node.traverseDescendants for the complete semantics of this function.
getSize
fun getSize(index: Int): IntSize
Retrieves the latest measured size for a given placeable index. This will return IntSize.Zero if this is called before premeasure.