NavControllerKt

public final class NavControllerKt


Summary

Public methods

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

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

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

Construct a new NavGraph

Public methods

NavControllerKt.createGraph

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

Construct a new NavGraph

Parameters
@IdRes int id

the graph's unique id

@IdRes int startDestination

the route for the start destination

@ExtensionFunctionType Function1<NavGraphBuilderUnit> builder

the builder used to construct the graph

NavControllerKt.createGraph

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

Construct a new NavGraph

Parameters
String startDestination

the route for the start destination

String route

the route for the graph

@ExtensionFunctionType Function1<NavGraphBuilderUnit> builder

the builder used to