public final class EntryProvider<T extends Object>


Holds a Entry class, metadata, and content for that key

Parameters
<T extends Object>

the type of the key for this NavEntry

Summary

Public constructors

<T extends Object> EntryProvider(
    @NonNull T key,
    @NonNull Object contentKey,
    @NonNull Map<@NonNull String, @NonNull Object> metadata,
    @Composable @NonNull Function1<@NonNull T, Unit> content
)

Public methods

final @Composable @NonNull Function1<@NonNull T, Unit>

content for this entry to be displayed when this entry is active

final @NonNull Object

A unique, stable id that uniquely identifies the content of this NavEntry.

final @NonNull T

key for this entry

final @NonNull Map<@NonNull String, @NonNull Object>

provides information to the display

Public constructors

EntryProvider

public <T extends Object> EntryProvider(
    @NonNull T key,
    @NonNull Object contentKey,
    @NonNull Map<@NonNull String, @NonNull Object> metadata,
    @Composable @NonNull Function1<@NonNull T, Unit> content
)
Parameters
<T extends Object>

the type of the key for this NavEntry

@NonNull T key

key for this entry

@NonNull Object contentKey

A unique, stable id that uniquely identifies the content of this NavEntry. To maximize stability, it should ge derived from the key. The contentKey type must be saveable (i.e. on Android, it should be saveable via Android). Defaults to key.toString().

@NonNull Map<@NonNull String, @NonNull Object> metadata

provides information to the display

@Composable @NonNull Function1<@NonNull T, Unit> content

content for this entry to be displayed when this entry is active

Public methods

getContent

Added in 1.0.0-alpha04
public final @Composable @NonNull Function1<@NonNull T, UnitgetContent()

content for this entry to be displayed when this entry is active

getContentKey

Added in 1.0.0-alpha04
public final @NonNull Object getContentKey()

A unique, stable id that uniquely identifies the content of this NavEntry. To maximize stability, it should ge derived from the key. The contentKey type must be saveable (i.e. on Android, it should be saveable via Android). Defaults to key.toString().

getKey

Added in 1.0.0-alpha04
public final @NonNullgetKey()

key for this entry

getMetadata

Added in 1.0.0-alpha04
public final @NonNull Map<@NonNull String, @NonNull ObjectgetMetadata()

provides information to the display