Android 12 Developer Preview is here! Try it out, and give us your feedback!

ComposeNavigator

class ComposeNavigator : Navigator<ComposeNavigator.Destination>
kotlin.Any
   ↳ androidx.navigation.Navigator<androidx.navigation.compose.ComposeNavigator.Destination>
   ↳ androidx.navigation.compose.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 classes

NavDestination specific to ComposeNavigator

Public constructors

Navigator that navigates through Composables.

Public methods
ComposeNavigator.Destination

NavDestination?
navigate(destination: ComposeNavigator.Destination, args: Bundle?, navOptions: NavOptions?, navigatorExtras: Navigator.Extras?)

Unit
onRestoreState(savedState: Bundle)

Bundle?

Boolean

Public constructors

<init>

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.

Public methods

createDestination

fun createDestination(): ComposeNavigator.Destination
fun navigate(
    destination: ComposeNavigator.Destination,
    args: Bundle?,
    navOptions: NavOptions?,
    navigatorExtras: Navigator.Extras?
): NavDestination?

onRestoreState

fun onRestoreState(savedState: Bundle): Unit

onSaveState

fun onSaveState(): Bundle?

popBackStack

fun popBackStack(): Boolean