EntryProviderKt

Added in 1.0.0-alpha11

public final class EntryProviderKt


Summary

Public methods

static final @NonNull Function1<@NonNull T, @NonNull NavEntry<@NonNull T>>
<T extends Object> entryProvider(
    @NonNull Function1<@NonNull unknownScreen, @NonNull NavEntry<@NonNull T>> fallback,
    @NonNull Function1<@NonNull EntryProviderScope<@NonNull T>, Unit> builder
)

Provides a EntryProviderScope to build an entryProvider that provides NavEntries.

Public methods

public static final @NonNull Function1<@NonNull T, @NonNull NavEntry<@NonNull T>> <T extends Object> entryProvider(
    @NonNull Function1<@NonNull unknownScreen, @NonNull NavEntry<@NonNull T>> fallback,
    @NonNull Function1<@NonNull EntryProviderScope<@NonNull T>, Unit> builder
)

Provides a EntryProviderScope to build an entryProvider that provides NavEntries.

Parameters
<T extends Object>

the type of the NavEntry key

@NonNull Function1<@NonNull unknownScreen, @NonNull NavEntry<@NonNull T>> fallback

the fallback NavEntry when the provider cannot find an entry associated with a given key on the backStack

@NonNull Function1<@NonNull EntryProviderScope<@NonNull T>, Unit> builder

the DSL extension that provides a EntryProviderScope to build an entryProvider that provides NavEntries.

Returns
@NonNull Function1<@NonNull T, @NonNull NavEntry<@NonNull T>>

an entryProvider that provides the NavEntry associated with a given key