FragmentNavigatorDestinationBuilder

@NavDestinationDsl public final class FragmentNavigatorDestinationBuilder extends NavDestinationBuilder


DSL for constructing a new FragmentNavigator.Destination

Summary

Public constructors

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

DSL for constructing a new FragmentNavigator.Destination

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

DSL for constructing a new FragmentNavigator.Destination

Public methods

@NonNull FragmentNavigator.Destination

Build the NavDestination by calling Navigator.createDestination.

Inherited methods

From class NavDestinationBuilder
final void
action(
    int actionId,
    @ExtensionFunctionType Function1<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(
    String name,
    @ExtensionFunctionType Function1<NavArgumentBuilderUnit> argumentBuilder
)

Add a NavArgument to this destination.

final void
deepLink(
    @ExtensionFunctionType Function1<NavDeepLinkDslBuilderUnit> navDeepLink
)

Add a deep link to this destination.

final void
deepLink(String uriPattern)

Add a deep link to this destination.

Public constructors

FragmentNavigatorDestinationBuilder

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

DSL for constructing a new FragmentNavigator.Destination

Parameters
FragmentNavigator navigator

navigator used to create the destination

@IdRes int id

the destination's unique id

KClass<Fragment> fragmentClass

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

FragmentNavigatorDestinationBuilder

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

DSL for constructing a new FragmentNavigator.Destination

Parameters
FragmentNavigator navigator

navigator used to create the destination

String route

the destination's unique route

KClass<Fragment> fragmentClass

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

Public methods

build

public @NonNull FragmentNavigator.Destination build()

Build the NavDestination by calling Navigator.createDestination.