Screen
interface and override the Content()
composable function.data class
(if you need to send params), class
(if no param is required) or even object
(useful for tabs).Navigator
is a composable function deeply integrated with Compose internals. It'll manage the lifecyle, back press, state restoration and even nested navigation for you.Screen
.LocalNavigator
to navigate to other screens. Take a look at the Stack API for the available operations.TopAppBar
or BottomNavigation
, you can easily reuse them with Voyager.CurrentScreen()
instead of navigator.lastItem.Content()
, because it will save the Screen's subtree for you (see SaveableStateHolder).