AppToolkitDefaults

data class AppToolkitDefaults(val shell: ShellSettings = ShellSettings(), val navigation: NavigationDefaults = NavigationDefaults())(source)

One app's defaults for the Toolkit: how its shell behaves and how its destinations look when nobody chose otherwise.

Each shell setting resolves as the person's saved developer option, then shell, then the Toolkit's own default. A saved choice is kept even when it equals the current default, so a later release that changes shell reaches only the people who never chose, and resetting the developer options returns to shell, not to the Toolkit's defaults.

Give navigation to the graph and shell to the host:

val defaults = appToolkitDefaults {
shell { backEdgeStyle = BackEdgeStyle.FollowFinger }
navigation { pageTopBarStyle = TopBarStyle.LargeCollapsed }
}
val graph = toolkitGraph(appTitle = R.string.app_name, defaults = defaults.navigation) { ... }
ShellHost(graph = graph, defaults = defaults.shell)

Constructors

Link copied to clipboard
constructor(shell: ShellSettings = ShellSettings(), navigation: NavigationDefaults = NavigationDefaults())

Properties

Link copied to clipboard
Link copied to clipboard