LocalOnBackPressedDispatcherOwner

object LocalOnBackPressedDispatcherOwner


Provides a OnBackPressedDispatcher that can be used by Composables hosted in a androidx.activity.ComponentActivity.

Summary

Public functions

infix ProvidedValue<OnBackPressedDispatcherOwner?>

Associates a LocalOnBackPressedDispatcherOwner key to a value in a call to CompositionLocalProvider.

Public properties

OnBackPressedDispatcherOwner?

Returns current composition local value for the owner or null if one has not been provided nor is one available by looking at the LocalContext.

Public functions

provides

infix fun provides(dispatcherOwner: OnBackPressedDispatcherOwner): ProvidedValue<OnBackPressedDispatcherOwner?>

Associates a LocalOnBackPressedDispatcherOwner key to a value in a call to CompositionLocalProvider.

Public properties

current

val currentOnBackPressedDispatcherOwner?

Returns current composition local value for the owner or null if one has not been provided nor is one available by looking at the LocalContext.