Package-level declarations

Types

Link copied to clipboard
class AndroidUiDispatcher : CoroutineDispatcher

A CoroutineDispatcher that will perform dispatch during a handler callback or choreographer's animation frame stage, whichever comes first. Use Main to obtain a dispatcher for the process's main thread (i.e. the activity thread).

Link copied to clipboard
class AndroidUiFrameClock(choreographer: Choreographer) : MonotonicFrameClock
Link copied to clipboard
expect object DisplayLinkClock : MonotonicFrameClock
actual object DisplayLinkClock : MonotonicFrameClock
Link copied to clipboard

The different recomposition modes of Molecule.

Link copied to clipboard

The different snapshot notification modes of Molecule.

Functions

Link copied to clipboard
fun <T> CoroutineScope.launchMolecule(mode: RecompositionMode, context: CoroutineContext = EmptyCoroutineContext, snapshotNotifier: SnapshotNotifier = defaultSnapshotNotifier(), body: @Composable () -> T): StateFlow<T>

Launch a coroutine into this CoroutineScope which will continually recompose body to produce a StateFlow stream of T values.

fun <T> CoroutineScope.launchMolecule(mode: RecompositionMode, emitter: (value: T) -> Unit, context: CoroutineContext = EmptyCoroutineContext, snapshotNotifier: SnapshotNotifier = defaultSnapshotNotifier(), body: @Composable () -> T)

Launch a coroutine into this CoroutineScope which will continually recompose body in the optional context to invoke emitter with each returned T value.

Link copied to clipboard
fun <T> moleculeFlow(mode: RecompositionMode, snapshotNotifier: SnapshotNotifier = defaultSnapshotNotifier(), body: @Composable () -> T): Flow<T>

Create a Flow which will continually recompose body to produce a stream of T values when collected.