navigateTo

abstract fun <A> navigateTo(to: DestinationId<A, *>, args: A, navOptions: NavOptions? = null)

Requests navigation to the given destination. An required parameter must be passed.

Parameters

to

The destination to navigate to.

args

An optional argument to pass to the destination. The argument will be saved in SavedStateHandle, therefore it must be savable to a Bundle.

navOptions

An optional NavOptions to use for this navigation.


open fun <A> navigateTo(to: DestinationId<A, *>, args: A, builder: NavOptionsBuilder.() -> Unit)

Requests navigation to the given destination. An required parameter must be passed.

Parameters

to

The destination to navigate to.

args

An optional argument to pass to the destination. The argument will be saved in SavedStateHandle, therefore it must be savable to a Bundle.

builder

An optional NavOptions builder to use for this navigation.


open fun navigateTo(to: DestinationId<Unit, *>, navOptions: NavOptions? = null)

Requests navigation to the given destination which takes no input parameter.

Parameters

to

The destination to navigate to.

navOptions

An optional NavOptions to use for this navigation.


open fun navigateTo(to: DestinationId<Unit, *>, builder: NavOptionsBuilder.() -> Unit)

Requests navigation to the given destination which takes no input parameter.

Parameters

to

The destination to navigate to.

builder

An optional NavOptions builder to use for this navigation.