CompositionInstance


CompositionInstance provides information about the composition of which a CompositionData is part.

Summary

Public functions

CompositionGroup?

Find the CompositionGroup that contains the CompositionContext created by a call to rememberCompositionContext that is the parent context for this composition.

Cmn

Public properties

CompositionData

The CompositionData for the instance

Cmn
CompositionInstance?

The parent composition instance, if the instance is part of a sub-composition.

Cmn

Public functions

findContextGroup

fun findContextGroup(): CompositionGroup?

Find the CompositionGroup that contains the CompositionContext created by a call to rememberCompositionContext that is the parent context for this composition. If this is the root of the composition (e.g. parent is null) then this method also returns null.

Public properties

data

val dataCompositionData

The CompositionData for the instance

parent

val parentCompositionInstance?

The parent composition instance, if the instance is part of a sub-composition. If this is the root of a composition (such as the content of a ComposeView), then parent will be null.