CompositionContext

class CompositionContext
kotlin.Any
   ↳ androidx.compose.CompositionContext

Summary

Public methods

Unit

Boolean

Recomposes any changes without forcing the component to compose and blocks until composition completes.

Companion functions

CompositionContext
prepare(context: Context, root: Any, component: Component, compositionReference: CompositionReference?)

CompositionContext
prepare(component: Component, ambientReference: CompositionReference?, makeComposer: Recomposer.() -> Composer<*>)

Properties

Component

Composer<*>

Public methods

compose

fun compose(): Unit

recomposeSync

fun recomposeSync(): Boolean

Recomposes any changes without forcing the component to compose and blocks until composition completes.

Return
true if there were pending changes, false otherwise.

Properties

component

val component: Component

composer

val composer: Composer<*>

Companion functions

prepare

fun prepare(
    context: Context,
    root: Any,
    component: Component,
    compositionReference: CompositionReference?
): CompositionContext

prepare

fun prepare(
    component: Component,
    ambientReference: CompositionReference?,
    makeComposer: Recomposer.() -> Composer<*>
): CompositionContext