NavOptions

data class NavOptions<T : Route>(singleTop: Boolean, popOptions: NavOptions.PopUpOptions<T>?, animationOptions: NavOptions.NavAnimation)

Set of options that can be optionally specified when navigating to new destination through ComposeNavigator.Controller.navigateTo.

These includes singleTop, popUpTo&withAnimation.

Constructors

Link copied to clipboard
fun <T : Route> NavOptions(singleTop: Boolean = false, popOptions: NavOptions.PopUpOptions<T>? = null, animationOptions: NavOptions.NavAnimation = NavAnimation())

Types

Link copied to clipboard
data class NavAnimation(target: TransitionKey, current: TransitionKey) : Parcelable
Link copied to clipboard
data class PopUpOptions<T : Route>(dest: KClass<out T>, inclusive: Boolean, all: Boolean)

Functions

Link copied to clipboard
fun popUpTo(destKey: KClass<out T>, options: NavOptions.PopUpOptions<T>.() -> Unit = {})

Pop up to a destination. Additional parameters can be set through options DSL.

Link copied to clipboard
fun withAnimation(options: NavOptions.NavAnimation.() -> Unit = {})

Customize transition for this navigation. You have to specify the transition for target & current destination.

Properties

Link copied to clipboard
var singleTop: Boolean = false

Ensures that there will be only once instance of this destination in the backstack.