-
- All Implemented Interfaces:
-
com.ramcosta.composedestinations.scope.DestinationScopeWithNoDependencies
@Immutable() public interface DestinationScope<T extends Object> implements DestinationScopeWithNoDependencies<T>
Scope where a destination screen will be called in.
-
-
Method Summary
Modifier and Type Method Description abstract DestinationDependenciesContainerbuildDependencies()Builds the DestinationDependenciesContainer which contains all dependencies by calling DestinationsNavHost'sdependencyContainerBuilderlambda parameter.abstract TypedDestinationSpec<T>getDestination()DestinationSpec related to this scope abstract NavBackStackEntrygetNavBackStackEntry()NavBackStackEntry of the current destination abstract NavControllergetNavController()NavController related to the NavHost abstract DestinationsNavigatorgetDestinationsNavigator()DestinationsNavigator useful to navigate from this destination abstract TgetNavArgs()Class holding the navigation arguments passed to this destination or Unit if the destination has no arguments -
-
Method Detail
-
buildDependencies
@Composable() abstract DestinationDependenciesContainer buildDependencies()
Builds the DestinationDependenciesContainer which contains all dependencies by calling
DestinationsNavHost'sdependencyContainerBuilderlambda parameter.When used, it will run the
dependencyContainerBuilderso even though that lambda is not expected to do any heavy calculations, use it only once per composition. So if you need multiple dependencies, store the result of this in a val first, then use the val each time.
-
getDestination
abstract TypedDestinationSpec<T> getDestination()
DestinationSpec related to this scope
-
getNavBackStackEntry
abstract NavBackStackEntry getNavBackStackEntry()
NavBackStackEntry of the current destination
-
getNavController
abstract NavController getNavController()
NavController related to the NavHost
-
getDestinationsNavigator
abstract DestinationsNavigator getDestinationsNavigator()
DestinationsNavigator useful to navigate from this destination
-
getNavArgs
abstract T getNavArgs()
Class holding the navigation arguments passed to this destination or Unit if the destination has no arguments
-
-
-
-