FragmentNavigatorDestinationBuilderKt

Added in 1.0.0

public final class FragmentNavigatorDestinationBuilderKt


Summary

Public methods

static final void
<F extends Fragment> fragment(@NonNull NavGraphBuilder receiver, @IdRes int id)

This method is deprecated. Use routes to create your FragmentDestination instead

static final void
<F extends Fragment> fragment(
    @NonNull NavGraphBuilder receiver,
    @NonNull String route
)

Construct a new FragmentNavigator.Destination

static final void
<F extends Fragment, T extends Object> fragment(
    @NonNull NavGraphBuilder receiver,
    @NonNull Map<@NonNull KType, @NonNull NavType<@NonNull ?>> typeMap
)

Construct a new FragmentNavigator.Destination

static final void
<F extends Fragment> fragment(
    @NonNull NavGraphBuilder receiver,
    @IdRes int id,
    @ExtensionFunctionType @NonNull Function1<@NonNull FragmentNavigatorDestinationBuilderUnit> builder
)

This method is deprecated. Use routes to create your FragmentDestination instead

static final void
<F extends Fragment> fragment(
    @NonNull NavGraphBuilder receiver,
    @NonNull String route,
    @ExtensionFunctionType @NonNull Function1<@NonNull FragmentNavigatorDestinationBuilderUnit> builder
)

Construct a new FragmentNavigator.Destination

static final void
<F extends Fragment, T extends Object> fragment(
    @NonNull NavGraphBuilder receiver,
    @NonNull Map<@NonNull KType, @NonNull NavType<@NonNull ?>> typeMap,
    @ExtensionFunctionType @NonNull Function1<@NonNull FragmentNavigatorDestinationBuilderUnit> builder
)

Construct a new FragmentNavigator.Destination

Public methods

public static final void <F extends Fragment> fragment(@NonNull NavGraphBuilder receiver, @IdRes int id)

Construct a new FragmentNavigator.Destination

Parameters
@IdRes int id

the destination's unique id

public static final void <F extends Fragment> fragment(
    @NonNull NavGraphBuilder receiver,
    @NonNull String route
)

Construct a new FragmentNavigator.Destination

Parameters
@NonNull String route

the destination's unique route

public static final void <F extends Fragment, T extends Object> fragment(
    @NonNull NavGraphBuilder receiver,
    @NonNull Map<@NonNull KType, @NonNull NavType<@NonNull ?>> typeMap
)

Construct a new FragmentNavigator.Destination

Parameters
<T extends Object>

the destination's unique route from a KClass

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

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

public static final void <F extends Fragment> fragment(
    @NonNull NavGraphBuilder receiver,
    @IdRes int id,
    @ExtensionFunctionType @NonNull Function1<@NonNull FragmentNavigatorDestinationBuilderUnit> builder
)

Construct a new FragmentNavigator.Destination

Parameters
@IdRes int id

the destination's unique id

@ExtensionFunctionType @NonNull Function1<@NonNull FragmentNavigatorDestinationBuilderUnit> builder

the builder used to construct the fragment destination

public static final void <F extends Fragment> fragment(
    @NonNull NavGraphBuilder receiver,
    @NonNull String route,
    @ExtensionFunctionType @NonNull Function1<@NonNull FragmentNavigatorDestinationBuilderUnit> builder
)

Construct a new FragmentNavigator.Destination

Parameters
@NonNull String route

the destination's unique route

@ExtensionFunctionType @NonNull Function1<@NonNull FragmentNavigatorDestinationBuilderUnit> builder

the builder used to construct the fragment destination

public static final void <F extends Fragment, T extends Object> fragment(
    @NonNull NavGraphBuilder receiver,
    @NonNull Map<@NonNull KType, @NonNull NavType<@NonNull ?>> typeMap,
    @ExtensionFunctionType @NonNull Function1<@NonNull FragmentNavigatorDestinationBuilderUnit> builder
)

Construct a new FragmentNavigator.Destination

Parameters
<T extends Object>

the destination's unique route from a KClass

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

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

@ExtensionFunctionType @NonNull Function1<@NonNull FragmentNavigatorDestinationBuilderUnit> builder

the builder used to construct the fragment destination