ComposeNavigator

@<Error class: unknown class>
class ComposeNavigator


Navigator that navigates through Composables. Every destination using this Navigator must set a valid Composable by setting it directly on an instantiated Destination or calling composable.

Summary

Nested types

NavDestination specific to ComposeNavigator

Public constructors

Public functions

open ComposeNavigator.Destination
open Unit
navigate(
    entries: List<<Error class: unknown class>>,
    navOptions: <Error class: unknown class>?,
    navigatorExtras: <Error class: unknown class>?
)
Unit

Callback to mark a navigation in transition as complete.

open Unit
Unit

Function to prepare the entry for transition.

Public properties

StateFlow<List<<Error class: unknown class>>>

Get the back stack from the state.

Public constructors

ComposeNavigator

Added in 2.4.0
ComposeNavigator()

Public functions

createDestination

Added in 2.4.0
open fun createDestination(): ComposeNavigator.Destination
open fun navigate(
    entries: List<<Error class: unknown class>>,
    navOptions: <Error class: unknown class>?,
    navigatorExtras: <Error class: unknown class>?
): Unit
fun onTransitionComplete(entry: <Error class: unknown class>): Unit

Callback to mark a navigation in transition as complete.

This should be called in conjunction with navigate and popBackStack as those calls merely start a transition to the target destination, and requires manually marking the transition as complete by calling this method.

Failing to call this method could result in entries being prevented from reaching their final Lifecycle.State.

open fun popBackStack(popUpTo: <Error class: unknown class>, savedState: Boolean): Unit
fun prepareForTransition(entry: <Error class: unknown class>): Unit

Function to prepare the entry for transition.

This should be called when the entry needs to move the Lifecycle.State in preparation for a transition such as when using predictive back.

Public properties

backStack

Added in 2.6.0
val backStackStateFlow<List<<Error class: unknown class>>>

Get the back stack from the state.