NavDeepLinkDslBuilderKt

Added in 2.3.0

public final class NavDeepLinkDslBuilderKt


Summary

Public methods

static final @NonNull NavDeepLink

Construct a new NavDeepLink

static final @NonNull NavDeepLink
<T extends Object> navDeepLink(
    @NonNull String basePath,
    @NonNull Map<@NonNull KType, @NonNull NavType<@NonNull ?>> typeMap,
    @ExtensionFunctionType @NonNull Function1<@NonNull NavDeepLinkDslBuilderUnit> deepLinkBuilder
)

Construct a new NavDeepLink

Public methods

public static final @NonNull NavDeepLink navDeepLink(
    @ExtensionFunctionType @NonNull Function1<@NonNull NavDeepLinkDslBuilderUnit> deepLinkBuilder
)

Construct a new NavDeepLink

Parameters
@ExtensionFunctionType @NonNull Function1<@NonNull NavDeepLinkDslBuilderUnit> deepLinkBuilder

the builder used to construct the deeplink

public static final @NonNull NavDeepLink <T extends Object> navDeepLink(
    @NonNull String basePath,
    @NonNull Map<@NonNull KType, @NonNull NavType<@NonNull ?>> typeMap,
    @ExtensionFunctionType @NonNull Function1<@NonNull NavDeepLinkDslBuilderUnit> deepLinkBuilder
)

Construct a new NavDeepLink

Extracts deeplink arguments from T and appends it to the basePath. The base path & generated arguments form the final uri pattern for the deeplink.

See docs on the safe args version of NavDeepLink.Builder.setUriPattern for the final uriPattern's generation logic.

Parameters
<T extends Object>

The deepLink KClass to extract arguments from

@NonNull String basePath

The base uri path to append arguments onto

@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 NavDeepLinkDslBuilderUnit> deepLinkBuilder

the builder used to construct the deeplink