Google is committed to advancing racial equity for Black communities. See how.

FrameManager

object FrameManager
kotlin.Any
   ↳ androidx.compose.FrameManager

The frame manager manages how changes to state objects are observed.

The FrameManager observers state reads during composition and records where in the composition the state read occur. If any of the state objects are modified it will invalidate the composition causing the associated Recomposer to schedule a recomposition.

Summary

Public methods
Unit

T
framed(block: () -> T)

Ensure that block is executed in a frame.

T
isolated(block: () -> T)

Unit

T
unframed(block: () -> T)

Public methods

ensureStarted

fun ensureStarted(): Unit

framed

fun <T> framed(block: () -> T): T

Deprecated.

Ensure that block is executed in a frame. If the code is not in a frame create one for the code to run in that is committed when block commits.

isolated

@TestOnly fun <T> isolated(block: () -> T): T

Deprecated.

nextFrame

fun nextFrame(): Unit

Deprecated.

unframed

@TestOnly fun <T> unframed(block: () -> T): T

Deprecated.