NavigatorProviderKt

public final class NavigatorProviderKt


Summary

Public methods

static final @NonNull T

Retrieves a registered Navigator by name.

static final @NonNull T
<T extends Navigator<@NonNull NavDestination>> NavigatorProviderKt.get(
    @NonNull NavigatorProvider receiver,
    @NonNull KClass<@NonNull T> clazz
)

Retrieves a registered Navigator using the name provided by the Navigator.Name annotation.

static final void

Register a navigator using the name provided by the Navigator.Name annotation.

static final @Nullable Navigator<@NonNull NavDestination>
NavigatorProviderKt.set(
    @NonNull NavigatorProvider receiver,
    @NonNull String name,
    @NonNull Navigator<@NonNull NavDestination> navigator
)

Register a Navigator by name.

Public methods

NavigatorProviderKt.get

@NonNull
public static final T <T extends Navigator<@NonNull NavDestination>> NavigatorProviderKt.get(
    @NonNull NavigatorProvider receiver,
    @NonNull String name
)

Retrieves a registered Navigator by name.

Throws
kotlin.IllegalStateException

if the Navigator has not been added

NavigatorProviderKt.get

@NonNull
public static final T <T extends Navigator<@NonNull NavDestination>> NavigatorProviderKt.get(
    @NonNull NavigatorProvider receiver,
    @NonNull KClass<@NonNull T> clazz
)

Retrieves a registered Navigator using the name provided by the Navigator.Name annotation.

Throws
kotlin.IllegalStateException

if the Navigator has not been added

NavigatorProviderKt.plusAssign

@NonNull
public static final void NavigatorProviderKt.plusAssign(
    @NonNull NavigatorProvider receiver,
    @NonNull Navigator<@NonNull NavDestination> navigator
)

Register a navigator using the name provided by the Navigator.Name annotation.

NavigatorProviderKt.set

@Nullable
public static final Navigator<@NonNull NavDestinationNavigatorProviderKt.set(
    @NonNull NavigatorProvider receiver,
    @NonNull String name,
    @NonNull Navigator<@NonNull NavDestination> navigator
)

Register a Navigator by name. If a navigator by this name is already registered, this new navigator will replace it.

Returns
Navigator<@NonNull NavDestination>

the previously added Navigator for the given name, if any