NavCommand

sealed interface NavCommand(source)

Immutable state-mutation command accepted by NavBackStackController.prepare.

Inheritors

Types

Link copied to clipboard
data class OpenDeepLink(val route: NavRoute, val targetStackId: NavStackId? = null, val launchMode: NavDeepLinkLaunchMode = NavDeepLinkLaunchMode.Reset) : NavCommand

Mutates a destination stack and selects it as one atomic transaction.

Link copied to clipboard
data object Pop : NavCommand

Removes the active stack's top entry when it is not the root.

Link copied to clipboard

Returns to the newest stack in selection history without adding the current stack back.

Link copied to clipboard
data class Push(val route: NavRoute, val launchMode: NavLaunchMode = NavLaunchMode.Standard) : NavCommand

Appends a resolved destination to the active stack.

Link copied to clipboard
data class ReplaceTop(val route: NavRoute) : NavCommand

Replaces the active top while retaining entries beneath it.

Link copied to clipboard
data class Reset(val route: NavRoute) : NavCommand

Replaces the complete active stack with one newly allocated root entry.

Link copied to clipboard
data class SelectStack(val stackId: NavStackId, val selectionMode: NavStackSelectionMode = NavStackSelectionMode.Preserve) : NavCommand

Selects an independently retained stack.