NavControllerKt

public final class NavControllerKt


Summary

Public methods

static final @NonNull NavGraph
NavControllerKt.createGraph(
    @NonNull NavController receiver,
    @IdRes int id,
    @IdRes int startDestination,
    @NonNull Function1<@NonNull NavGraphBuilderUnit> builder
)

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

static final @NonNull NavGraph
NavControllerKt.createGraph(
    @NonNull NavController receiver,
    @NonNull String startDestination,
    @Nullable String route,
    @NonNull Function1<@NonNull NavGraphBuilderUnit> builder
)

Construct a new NavGraph

Public methods

NavControllerKt.createGraph

@NonNull
public static final NavGraph NavControllerKt.createGraph(
    @NonNull NavController receiver,
    @IdRes int id,
    @IdRes int startDestination,
    @NonNull Function1<@NonNull NavGraphBuilderUnit> builder
)

Construct a new NavGraph

Parameters
@IdRes int id

the graph's unique id

@IdRes int startDestination

the route for the start destination

@NonNull Function1<@NonNull NavGraphBuilderUnit> builder

the builder used to construct the graph

NavControllerKt.createGraph

@NonNull
public static final NavGraph NavControllerKt.createGraph(
    @NonNull NavController receiver,
    @NonNull String startDestination,
    @Nullable String route,
    @NonNull Function1<@NonNull NavGraphBuilderUnit> builder
)

Construct a new NavGraph

Parameters
@NonNull String startDestination

the route for the start destination

@Nullable String route

the route for the graph

@NonNull Function1<@NonNull NavGraphBuilderUnit> builder

the builder used to construct the graph