-
- All Implemented Interfaces:
-
com.ramcosta.composedestinations.navigation.DestinationsNavigator
public class EmptyDestinationsNavigator implements DestinationsNavigator
Empty implementation of DestinationsNavigator Useful for tests and Composable previews.
-
-
Field Summary
Fields Modifier and Type Field Description public final static EmptyDestinationsNavigatorINSTANCE
-
Method Summary
Modifier and Type Method Description Unitnavigate(Direction direction, Function1<DestinationsNavOptionsBuilder, Unit> builder)Navigates to the given Direction. Unitnavigate(Direction direction, NavOptions navOptions, Navigator.Extras navigatorExtras)Navigates to the given Direction. BooleannavigateUp()BooleanpopBackStack()BooleanpopBackStack(RouteOrDirection route, Boolean inclusive, Boolean saveState)BooleanclearBackStack(RouteOrDirection route)NavBackStackEntrygetBackStackEntry(RouteOrDirection route)Like NavController. -
-
Method Detail
-
navigate
Unit navigate(Direction direction, Function1<DestinationsNavOptionsBuilder, Unit> builder)
Navigates to the given Direction. NavGraphSpec are Direction. Generated
Destinationsare Direction if they don't have any navigation arguments or you can call theirinvokemethod passing the arguments to get a Direction instance.- Parameters:
builder- NavOptionsBuilder
-
navigate
Unit navigate(Direction direction, NavOptions navOptions, Navigator.Extras navigatorExtras)
Navigates to the given Direction. NavGraphSpec are Direction. Generated
Destinationsare Direction if they don't have any navigation arguments or you can call theirinvokemethod passing the arguments to get a Direction instance.- Parameters:
navOptions- NavOptionsnavigatorExtras- Navigator.Extras
-
navigateUp
Boolean navigateUp()
-
popBackStack
Boolean popBackStack()
-
popBackStack
Boolean popBackStack(RouteOrDirection route, Boolean inclusive, Boolean saveState)
-
clearBackStack
Boolean clearBackStack(RouteOrDirection route)
-
getBackStackEntry
NavBackStackEntry getBackStackEntry(RouteOrDirection route)
Like NavController.getBackStackEntry but returns null if RouteOrDirection is not in the back stack instead of throwing an exception.
-
-
-
-