Package-level declarations

Types

Link copied to clipboard
@Serializable
data object ShellHomeRoute : NavKey

The shell itself: app bar, tabs and navigation. It is always the bottom of the outer back stack once the shell is showing, under every open page, and is never registered in the graph.

Link copied to clipboard

The shell's navigation state and the only way screens move through it.

Link copied to clipboard
class ShellSearch(initialQuery: String = "")

The query typed into a tab's app bar search field. One per searchable tab, kept by the shell so the field in the bar and the results in the tab can never disagree.

Properties

Link copied to clipboard

The page being drawn, or null inside the shell's tabs.

Link copied to clipboard

The graph the shell is showing.

Link copied to clipboard

Functions

Link copied to clipboard
fun rememberShellNavigator(graph: ShellGraph, onExit: () -> Unit, start: NavKey = graph.start): ShellNavigator

Creates the navigator with stacks that survive configuration changes and process death. Every key on them must be @Serializable.

Link copied to clipboard
fun ShellBackHandler(enabled: Boolean = true, onBack: () -> Unit)

Handles back while enabled, ahead of the displays composed before it.

Link copied to clipboard
fun <T : Any> ShellNavDisplay(entries: List<NavEntry<T>>, sceneStrategies: List<SceneStrategy<T>>, onBack: () -> Unit, modifier: Modifier = Modifier, transitionSpec: AnimatedContentTransitionScope<Scene<T>>.() -> ContentTransform, popTransitionSpec: AnimatedContentTransitionScope<Scene<T>>.() -> ContentTransform, activityBack: () -> Boolean = { true }, backEnabled: Boolean = true, predictivePopTransitionSpec: AnimatedContentTransitionScope<Scene<T>>.(swipeEdge: Int) -> ContentTransform = { popTransitionSpec() })

A NavDisplay whose predictive back is Android's cross-activity back animation.