Navigator

interface Navigator(source)

Inheritors

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
abstract fun navigateBack()

Removes the top entry from the backstack to show the previous destination.

Link copied to clipboard
inline fun <T : NavRoute> Navigator.navigateBackTo(inclusive: Boolean = false)

Removes all entries from the backstack until T. If inclusive is true T itself will also be removed.

Link copied to clipboard
abstract fun <T : BaseRoute> navigateBackToInternal(popUpTo: DestinationId<T>, inclusive: Boolean = false)

Removes all entries from the backstack until T. If inclusive is true T itself will also be removed.

Link copied to clipboard
abstract fun navigateTo(route: NavRoute)

Triggers navigation to the given route.

Link copied to clipboard
abstract fun navigateToRoot(root: NavRoot, restoreRootState: Boolean = false)

Triggers navigation to the given root. The current back stack will be removed and saved. Whether the backstack of the given root is restored depends on restoreRootState.

Link copied to clipboard
abstract fun navigateUp()

Triggers up navigation.

Link copied to clipboard
abstract fun replaceAll(root: NavRoot)

Replace the current back stack with the given root. The current back stack will cleared and the given root will be recreated. After this call the back stack will only contain the given root.

Link copied to clipboard
abstract fun resetToRoot(root: NavRoot)

Reset the back stack to the given root. The current back stack will cleared and if root was already on it it will be recreated.