Function

ControlledComposition

This method is a way to initiate a composition.

ControlledComposition

Common
@TestOnly
public fun ControlledComposition(
    applier: Applier<*>,
    parent: CompositionContext,
): ControlledComposition

This method is a way to initiate a composition. Optionally, a parent CompositionContext can be provided to make the composition behave as a sub-composition of the parent or a Recomposer can be provided.

A controlled composition allows direct control of the composition instead of it being controlled by the Recomposer passed ot the root composition.

It is important to call Composition.dispose this composer is no longer needed in order to release resources.

Parameters

applier The Applier instance to be used in the composition.
parent The parent CompositionContext.