Navigation Container
Container component that provides navigation for screens, which were added in scope. It is expected to have only one NavigationContainer per application.
Parameters
The key can be used to re-apply setup without unnecessary UI recomposition.
The action, which will be triggered on BackDestination sent, in case backstack is empty.
Screen size, used to properly calculate transition distance for animations.
The controller, which is responsible for navigation.
The layout that is always in the background, regardless of the current Destination. In most cases, it should not have semantics - if this is the case for you, remember to clear it using clearAndSetSemantics.
The component, which is always located at the top of the current screen.
The component, which represents UI for backstack navigation. Size and orientation depend on NavigationConfiguration.bottomNavigation.
The scope, which allows to set configuration-related properties via NavigationConfiguration.
The scope, which allows to bind destinations with respective screen composables via NavigationScope.screen. Example:
NavigationContainer(
key = "app",
onClose = { finish() },
screenSize = size,
controller = controller,
) {
screen(Home::class) { HomeScreen() }
screen(Profile::class) { ProfileScreen() }
}