-
- All Implemented Interfaces:
-
com.ramcosta.composedestinations.spec.Direction,com.ramcosta.composedestinations.spec.RouteOrDirection,com.ramcosta.composedestinations.spec.TypedDestinationSpec,com.ramcosta.composedestinations.spec.TypedRoute
public interface DirectionDestinationSpec implements TypedDestinationSpec<Unit>, Direction
TypedDestinationSpec 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. 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. DestinationStylegetStyle()CharSequencegetLabel()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
-
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.
-
getStyle
DestinationStyle getStyle()
-
getLabel
CharSequence getLabel()
-
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()
-
-
-
-