-
- All Implemented Interfaces:
-
com.ramcosta.composedestinations.spec.Direction,com.ramcosta.composedestinations.spec.RouteOrDirection,com.ramcosta.composedestinations.spec.TypedNavGraphSpec,com.ramcosta.composedestinations.spec.TypedRoute
public interface DirectionNavGraphSpec implements TypedNavGraphSpec<Unit, Unit>, Direction
TypedNavGraphSpec that does not contain any navigation arguments. It itself is a Direction
-
-
Method Summary
Modifier and Type Method Description Directioninvoke(Unit navArgs)Function to get a Direction you can then pass to com.ramcosta.composedestinations.navigation.DestinationsNavigator or to NavController.navigateTo() to safely navigate to this Destination. Directioninvoke()UnitargsFrom(Bundle bundle)Method that returns the navigation arguments class of this Composable for the bundle when the destination gets navigated to. UnitargsFrom(SavedStateHandle savedStateHandle)Method that returns the navigation arguments class of this Composable for the savedStateHandle. StringgetBaseRoute()abstract TypedRoute<Unit>getStartRoute()Start Route of this navigation graph. abstract List<TypedDestinationSpec<?>>getDestinations()All destinations which belong to this navigation graph List<TypedNavGraphSpec<?, ?>>getNestedNavGraphs()abstract DestinationStyle.AnimatedgetDefaultTransitions()Default enter/exit transition animations for destinations that belong to this navigation graph. abstract StringgetRoute()Full route pattern that will be added to the navigation graph. List<NamedNavArgument>getArguments()List<NavDeepLink>getDeepLinks()-
Methods inherited from class com.ramcosta.composedestinations.spec.TypedNavGraphSpec
argsFrom -
Methods inherited from class com.ramcosta.composedestinations.spec.DirectionNavGraphSpec
requireGraphArgs, requireGraphArgs, requireGraphArgs -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Method Detail
-
invoke
Direction invoke(Unit navArgs)
Function to get a Direction you can then pass to com.ramcosta.composedestinations.navigation.DestinationsNavigator or to NavController.navigateTo() to safely navigate to this Destination.
-
argsFrom
Unit argsFrom(Bundle bundle)
Method that returns the navigation arguments class of this Composable for the bundle when the destination gets navigated to.
-
argsFrom
Unit argsFrom(SavedStateHandle savedStateHandle)
Method that returns the navigation arguments class of this Composable for the savedStateHandle. This is useful when the SavedStateHandle is created with the navigation arguments, for example, inside the ViewModel.
If you're manually creating the ViewModel, use the
AbstractSavedStateViewModelFactoryand pass the NavBackStackEntry.arguments as the second constructor parameter. If you're using something like Hilt, then that is done for you out of the box.
-
getBaseRoute
String getBaseRoute()
-
getStartRoute
abstract TypedRoute<Unit> getStartRoute()
Start Route of this navigation graph.
-
getDestinations
abstract List<TypedDestinationSpec<?>> getDestinations()
All destinations which belong to this navigation graph
-
getNestedNavGraphs
List<TypedNavGraphSpec<?, ?>> getNestedNavGraphs()
-
getDefaultTransitions
abstract DestinationStyle.Animated getDefaultTransitions()
Default enter/exit transition animations for destinations that belong to this navigation graph. If not specified (null), then the parent ones will apply.
If the TypedDestinationSpec.style itself defines another set of animations, then those ones will apply instead of this.
-
getRoute
abstract String getRoute()
Full route pattern that will be added to the navigation graph. Navigation arguments are not filled in.
-
getArguments
List<NamedNavArgument> getArguments()
-
getDeepLinks
List<NavDeepLink> getDeepLinks()
-
-
-
-