toolkitGraph
fun toolkitGraph(@StringRes appTitle: Int, appIcon: ToolkitIcon? = null, defaults: NavigationDefaults = NavigationDefaults(), builder: ShellGraphBuilder.() -> Unit): ShellGraph(source)
Builds a ShellGraph with the Toolkit's own pages already in it: the settings list and its pages, about, licenses, help, support, permissions, ads settings, developer options and the first-launch start screens.
The app's builder runs first, so a page it registers for one of the Toolkit's keys replaces the Toolkit's page, and a feature's registration function it calls itself, such as aboutPages { ... }, takes its arguments. The app still decides where each page is offered: in the drawer, the overflow menu or from a screen.
defaults set the app bar of every destination that names none, the Toolkit's pages included, and the layout policy ShellHost uses; see appToolkitDefaults { }.
val graph = toolkitGraph(appTitle = R.string.app_name) {
tab(HomeRoute, R.string.home, ToolkitIcon.Vector(Icons.Outlined.Home)) { HomeScreen() }
drawer { settings(); link(HelpRoute, R.string.help, ToolkitIcon.Vector(Icons.Outlined.Help)) }
overflow { supportUs() }
}Content copied to clipboard