Navigation Operations

Guia provides an extensive list of navigation operations.

currentKey

val Navigator.currentKey

Returns the current NavigationKey

currentEntry

val Navigator.currentEntry

Returns the current BackStackEntry

push

fun Navigator.push(
    navigationKey: NavigationKey
)

Adds a new key to the backstack.

pop

fun Navigator.pop(): Boolean

Pops the last entry in the backstack.

replaceLast

Adds a new key to the backstack.

replaceUpTo

Loops through navigation keys from the top of the backstack until the predicate is satisfied and replaces all those keys with a new key.

replaceUpTo [Key]

Replaces all navigation keys in the backstack until a key of type [Key] is reached.

moveToTop

Moves a navigation key that matches the given condition to the top

moveToTop [Key]

Moves a navigation key of type [Key] to the top of backstack.

singleInstance

Navigates to a navigation key and removes all navigation keys that are of the same type from the backstack.

singleTop

Navigates to [navigationKey] if the currentKey is not of the same type.

popTo

Pops to a [NavigationKey] matching [predicate]

popTo [Key]

Pops to a [NavigationKey] of the same type [Key].

removeAll

Removes all navigation keys matching [predicate].

removeAll [Key]

Removes all navigation keys that are of type [Key].

popToRoot

Pops to the root of the backstack.

setRoot

Clears the backstack and sets a new root [NavigationKey]

canGoback

Whether or not the navigator has more than one element and can pop back stack.

none

Checks if none of the navigation keys matches the condition.

none [Key]

Checks if none of the navigation keys is of type [Key].

any

Checks if any of the navigation keys matches the condition.

any [Key]

Checks if any of the navigation keys is of type [Key].

Last updated