Class

ComposeNavigator

Navigator that navigates through Composables.

Source set: Common
@Navigator.Name("composable")
public class ComposeNavigator constructor() : Navigator<Destination>(NAME)

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.

Properties

backStack

Source set: Common
public val backStack: StateFlow<List<NavBackStackEntry>>

Get the back stack from the state.

Functions

prepareForTransition

public fun prepareForTransition(entry: NavBackStackEntry)

Function to prepare the entry for transition.

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

onTransitionComplete

public fun onTransitionComplete(entry: NavBackStackEntry)

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 androidx.lifecycle.Lifecycle.State.

Companion Object

Last updated: