🌈 Create new beautiful Compose Gradients with our new wesite ->
Interface

SubcomposeLayoutState.PrecomposedSlotHandle

Instance of this interface is returned by precompose function.

Source set: Common
public interface PrecomposedSlotHandle

Instance of this interface is returned by precompose function.

Properties

placeablesCount

Source set: Common
public val placeablesCount: Int

The amount of placeables composed into this slot.

Functions

dispose

Source set: Common
public 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

Source set: Common
public 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

Source set: Common
public 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

Source set: Common
public 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.