NavEntry

constructor(key: T, contentKey: Any = defaultContentKey(key), metadata: Map<String, Any> = emptyMap(), content: @Composable (T) -> Unit)

Parameters

key

key for this entry

contentKey

A unique, stable id that 1. uniquely identifies the content of this NavEntry 2. uniquely identifies any NavEntryDecorator states associated with this NavEntry.

NavEntries that share the same contentKey will be handled as sharing the same content and/or
[NavEntryDecorator] state. To maximize stability, it should be derived from the [key]. The
contentKey type must be saveable (i.e. on Android, it should be saveable via Android).
Defaults to [key].toString().
metadata

provides information to the display

content

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

Type Parameters

T

the type of the key for this NavEntry


constructor(navEntry: NavEntry<T>, content: @Composable (T) -> Unit)

NavEntry constructor to create a NavEntry from another NavEntry

Parameters

navEntry

The entry that provides the key, contentKey, and metadata for the new entry.

content

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