-
public final class NavControllerKt
-
-
Method Summary
Modifier and Type Method Description final static <T extends Any> <ERROR CLASS>rememberNavController(List<T> initialBackstack)Creates and remembers a new NavController instance. final static <T extends Any> <ERROR CLASS>rememberNavController(T startDestination)Creates and remembers a new NavController instance. final static <T extends Any> <ERROR CLASS>navController(List<T> initialBackstack)Creates a new NavController instance. final static <T extends Any> <ERROR CLASS>navController(T startDestination)Creates a new NavController instance. -
-
Method Detail
-
rememberNavController
@Composable() final static <T extends Any> <ERROR CLASS> rememberNavController(List<T> initialBackstack)
Creates and remembers a new NavController instance. Its backstack will be prefilled with destinations from the initialBackstack.
The order of the items in the list is interpreted as going from the bottom of the backstack to the top. It means that the last item of the list will become the currently displayed item in NavHost. The first item of the list will be the last item that can be popped off the backstack.
The initialBackstack list may be empty.
This method uses rememberSaveable internally and restores NavController state in case of activity or process recreation.
-
rememberNavController
@Composable() final static <T extends Any> <ERROR CLASS> rememberNavController(T startDestination)
Creates and remembers a new NavController instance. Its backstack will contain a single item - startDestination.
This method uses rememberSaveable internally and restores NavController state in case of activity or process recreation.
-
navController
final static <T extends Any> <ERROR CLASS> navController(List<T> initialBackstack)
Creates a new NavController instance. Its backstack will be prefilled with destinations from the initialBackstack.
The order of the items in the list is interpreted as going from the bottom of the backstack to the top. It means that the last item of the list will become the currently displayed item in NavHost. The first item of the list will be the last item that can be popped off the backstack.
The initialBackstack list may be empty.
-
navController
final static <T extends Any> <ERROR CLASS> navController(T startDestination)
Creates a new NavController instance. Its backstack will contain a single item - startDestination.
-
-
-
-