Package-level declarations
Types
Link copied to clipboard
interface ComposableLifecycleObserver
An interface for observing lifecycle events of a LifecycleOwner.
Functions
Link copied to clipboard
fun ComposableLifecycleEventObserver(observer: ComposableLifecycleObserver, lifecycleOwner: LifecycleOwner = LocalLifecycleOwner.current)
A Composable function that observes lifecycle events and invokes the corresponding methods on the provided ComposableLifecycleObserver.
fun ComposableLifecycleEventObserver(lifecycleOwner: LifecycleOwner = LocalLifecycleOwner.current, onCreate: (LifecycleOwner) -> Unit? = null, onStart: (LifecycleOwner) -> Unit? = null, onResume: (LifecycleOwner) -> Unit? = null, onPause: (LifecycleOwner) -> Unit? = null, onStop: (LifecycleOwner) -> Unit? = null, onDestroy: (LifecycleOwner) -> Unit? = null, onAny: (LifecycleOwner, Lifecycle.Event) -> Unit? = null)
Convenience Composable function to observe specific lifecycle events via individual callbacks.
Link copied to clipboard
fun ListenToComposableLifecycle(lifecycleOwner: LifecycleOwner = LocalLifecycleOwner.current, onEvent: (event: Lifecycle.Event) -> Unit)
Observes the lifecycle events of a Composable function without needing the LifecycleOwner parameter.
fun ListenToComposableLifecycle(lifecycleOwner: LifecycleOwner = LocalLifecycleOwner.current, onEvent: (source: LifecycleOwner, event: Lifecycle.Event) -> Unit)
Observes the lifecycle of a Composable function.
Link copied to clipboard
fun rememberLifecycleEvent(lifecycleOwner: LifecycleOwner = LocalLifecycleOwner.current): Lifecycle.Event
Remembers the current lifecycle event and updates it as the lifecycle changes.