-
- All Implemented Interfaces:
-
com.ramcosta.composedestinations.spec.RouteOrDirection,com.ramcosta.composedestinations.spec.TypedRoute
public interface TypedNavGraphSpec<NAV_ARGS extends Object, START_ROUTE_NAV_ARGS extends Object> implements TypedRoute<NAV_ARGS>
Defines a navigation graph.
-
-
Method Summary
Modifier and Type Method Description NAV_ARGSrequireGraphArgs(Bundle bundle)Like argsFrom but throws an exception if the arguments are not present. NAV_ARGSrequireGraphArgs(SavedStateHandle savedStateHandle)Like argsFrom but throws an exception if the arguments are not present. NAV_ARGSrequireGraphArgs(NavBackStackEntry navBackStackEntry)Like argsFrom but throws an exception if the arguments are not present. abstract TypedRoute<START_ROUTE_NAV_ARGS>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. abstract StringgetBaseRoute()Prefix of the route - basically route without argument info. List<NamedNavArgument>getArguments()List<NavDeepLink>getDeepLinks()-
-
Method Detail
-
requireGraphArgs
NAV_ARGS requireGraphArgs(Bundle bundle)
Like argsFrom but throws an exception if the arguments are not present.
In Navigation graphs, the arguments might be or might not be there depending on if you have navigated directly to a destination, in which case arguments may not be present, or if you have navigated to the navigation graph, in which case the arguments will be present.
-
requireGraphArgs
NAV_ARGS requireGraphArgs(SavedStateHandle savedStateHandle)
Like argsFrom but throws an exception if the arguments are not present.
In Navigation graphs, the arguments might be or might not be there depending on if you have navigated directly to a destination, in which case arguments may not be present, or if you have navigated to the navigation graph, in which case the arguments will be present.
-
requireGraphArgs
NAV_ARGS requireGraphArgs(NavBackStackEntry navBackStackEntry)
Like argsFrom but throws an exception if the arguments are not present.
In Navigation graphs, the arguments might be or might not be there depending on if you have navigated directly to a destination, in which case arguments may not be present, or if you have navigated to the navigation graph, in which case the arguments will be present.
-
getStartRoute
abstract TypedRoute<START_ROUTE_NAV_ARGS> 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.
-
getBaseRoute
abstract String getBaseRoute()
Prefix of the route - basically route without argument info.
-
getArguments
List<NamedNavArgument> getArguments()
-
getDeepLinks
List<NavDeepLink> getDeepLinks()
-
-
-
-