-
- All Implemented Interfaces:
-
com.ramcosta.composedestinations.scope.DestinationScope,com.ramcosta.composedestinations.scope.DestinationScopeWithNoDependencies
@RestrictTo(value = {RestrictTo.Scope.LIBRARY_GROUP}) public abstract class DestinationScopeImpl<T extends Object> implements DestinationScope<T>
-
-
Field Summary
Fields Modifier and Type Field Description private final Function1<DependenciesContainerBuilder<?>, Unit>dependenciesContainerBuilderprivate final TnavArgsprivate final DestinationsNavigatordestinationsNavigatorprivate final TypedDestinationSpec<T>destinationprivate final NavBackStackEntrynavBackStackEntryprivate final NavControllernavController
-
Constructor Summary
Constructors Constructor Description DestinationScopeImpl()
-
Method Summary
Modifier and Type Method Description abstract Function1<DependenciesContainerBuilder<?>, Unit>getDependenciesContainerBuilder()TgetNavArgs()Class holding the navigation arguments passed to this destination or Unit if the destination has no arguments DestinationsNavigatorgetDestinationsNavigator()abstract TypedDestinationSpec<T>getDestination()DestinationSpec related to this scope abstract NavBackStackEntrygetNavBackStackEntry()NavBackStackEntry of the current destination abstract NavControllergetNavController()NavController related to the NavHost DestinationDependenciesContainerbuildDependencies()Builds the DestinationDependenciesContainer which contains all dependencies by calling DestinationsNavHost'sdependencyContainerBuilderlambda parameter.-
-
Method Detail
-
getDependenciesContainerBuilder
abstract Function1<DependenciesContainerBuilder<?>, Unit> getDependenciesContainerBuilder()
-
getNavArgs
T getNavArgs()
Class holding the navigation arguments passed to this destination or Unit if the destination has no arguments
-
getDestinationsNavigator
DestinationsNavigator getDestinationsNavigator()
-
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
-
buildDependencies
@Composable() 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.
-
-
-
-