FragmentNavigatorDestinationBuilder


@NavDestinationDsl
public final class FragmentNavigatorDestinationBuilder extends NavDestinationBuilder


DSL for constructing a new FragmentNavigator.Destination

Summary

Public constructors

FragmentNavigatorDestinationBuilder(
    @NonNull FragmentNavigator navigator,
    @IdRes int id,
    @NonNull KClass<@NonNull Fragment> fragmentClass
)

This method is deprecated. Use routes to build your FragmentNavigatorDestination instead

FragmentNavigatorDestinationBuilder(
    @NonNull FragmentNavigator navigator,
    @NonNull String route,
    @NonNull KClass<@NonNull Fragment> fragmentClass
)

DSL for constructing a new FragmentNavigator.Destination

FragmentNavigatorDestinationBuilder(
    @NonNull FragmentNavigator navigator,
    @NonNull KClass<@NonNull Object> route,
    @NonNull Map<@NonNull KType, @NonNull NavType<@NonNull ?>> typeMap,
    @NonNull KClass<@NonNull Fragment> fragmentClass
)

DSL for constructing a new FragmentNavigator.Destination

Public methods

@NonNull FragmentNavigator.Destination

Build the NavDestination by calling Navigator.createDestination.

Inherited methods

From androidx.navigation.NavDestinationBuilder
final void
action(
    int actionId,
    @ExtensionFunctionType @NonNull Function1<@NonNull NavActionBuilderUnit> actionBuilder
)

This method is deprecated. Building NavDestinations using IDs with the Kotlin DSL has been deprecated in favor of using routes.

final void
argument(
    @NonNull String name,
    @ExtensionFunctionType @NonNull Function1<@NonNull NavArgumentBuilderUnit> argumentBuilder
)

Add a NavArgument to this destination.

final void

Add a NavArgument to this destination.

final void
<T extends Object> deepLinkSafeArgs(@NonNull String basePath)

Add a deep link to this destination.

final void

Add a deep link to this destination.

final void

Add a deep link to this destination.

final void
deepLink(@NonNull String uriPattern)

Add a deep link to this destination.

final void
<T extends Object> deepLink(
    @NonNull String basePath,
    @ExtensionFunctionType @NonNull Function1<@NonNull NavDeepLinkDslBuilderUnit> navDeepLink
)

Add a deep link to this destination.

final int

The destination's unique ID.

final CharSequence

The descriptive label of the destination

final @NonNull Navigator<@NonNull FragmentNavigator.Destination>

The navigator the destination that will be used in instantiateDestination to create the destination.

final String

The destination's unique route.

@NonNull FragmentNavigator.Destination

Instantiate a new instance of D that will be passed to build.

final void

The descriptive label of the destination

Public constructors

FragmentNavigatorDestinationBuilder

Added in 2.0.0
public FragmentNavigatorDestinationBuilder(
    @NonNull FragmentNavigator navigator,
    @IdRes int id,
    @NonNull KClass<@NonNull Fragment> fragmentClass
)

DSL for constructing a new FragmentNavigator.Destination

Parameters
@NonNull FragmentNavigator navigator

navigator used to create the destination

@IdRes int id

the destination's unique id

@NonNull KClass<@NonNull Fragment> fragmentClass

The class name of the Fragment to show when you navigate to this destination

FragmentNavigatorDestinationBuilder

public FragmentNavigatorDestinationBuilder(
    @NonNull FragmentNavigator navigator,
    @NonNull String route,
    @NonNull KClass<@NonNull Fragment> fragmentClass
)

DSL for constructing a new FragmentNavigator.Destination

Parameters
@NonNull FragmentNavigator navigator

navigator used to create the destination

@NonNull String route

the destination's unique route

@NonNull KClass<@NonNull Fragment> fragmentClass

The class name of the Fragment to show when you navigate to this destination

FragmentNavigatorDestinationBuilder

public FragmentNavigatorDestinationBuilder(
    @NonNull FragmentNavigator navigator,
    @NonNull KClass<@NonNull Object> route,
    @NonNull Map<@NonNull KType, @NonNull NavType<@NonNull ?>> typeMap,
    @NonNull KClass<@NonNull Fragment> fragmentClass
)

DSL for constructing a new FragmentNavigator.Destination

Parameters
@NonNull FragmentNavigator navigator

navigator used to create the destination

@NonNull KClass<@NonNull Object> route

the route from a KClass of the destination

@NonNull Map<@NonNull KType, @NonNull NavType<@NonNull ?>> typeMap

map of destination arguments' kotlin type KType to its respective custom NavType. May be empty if route does not use custom NavTypes.

@NonNull KClass<@NonNull Fragment> fragmentClass

The class name of the Fragment to show when you navigate to this destination

Public methods

build

Added in 1.0.0
public @NonNull FragmentNavigator.Destination build()

Build the NavDestination by calling Navigator.createDestination.