ComposeNavigator

class ComposeNavigator

A navigator for managing pure composable navigation in Jetpack Compose.

Types

Link copied to clipboard
class Builder
Link copied to clipboard
object Companion
Link copied to clipboard
class Controller<T : Route>

A controller to manage navigation for Route T.

Link copied to clipboard
class DialogScope<T : DialogRoute>

DialogScope provides functions that are convenient and only applicable in the context of Controller.CreateDialog such as dismiss, dialogRoute& a dialogNavigator.

Functions

Link copied to clipboard
fun canGoBack(): Boolean

Recursive reverse calls to History.canGoBack from backStackMap to identify if back navigation is possible or not.

Link copied to clipboard
fun getAllHistory(): List<Route>
Link copied to clipboard
fun getAllKeys(): List<RouteKey<out Route>>
Link copied to clipboard
fun getHistory(key: RouteKey<out Route>): List<Route>
Link copied to clipboard
fun goBack(): Route?

Recursive reverse call to History.canGoBack to identify if back navigation is possible or not.

Link copied to clipboard
fun goBackToRoot(): Boolean

Jump back to the root destination of the leaf navigation.

Link copied to clipboard
fun goBackUntil(destKey: KClass<out Route>, inclusive: Boolean = false): Boolean

Go back call until destination is satisfied. It also considers destination from parent navigation.

Link copied to clipboard
fun onSaveInstanceState(outState: Bundle)

Save all the ComposeNavigator's internal states along with destination states.

Link copied to clipboard
@Composable
fun <T : Route> Setup(modifier: Modifier = Modifier, key: RouteKey<T>, initial: T, controller: ComposeNavigator.Controller<T>, content: @Composable (T) -> Unit)

An entry to setup navigation.