entry

fun <K : T> EntryProviderScope<T>.entry(key: K, contentKey: Any = defaultContentKey(key), metadata: Map<String, Any> = emptyMap(), content: @Composable (K) -> Unit)

Add an entry provider to the EntryProviderScope

Parameters

key

key for this entry

contentKey

A unique, stable id that uniquely identifies the content of this NavEntry. 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

K

the type of the key for this NavEntry


fun <K : T> EntryProviderScope<T>.entry(key: K, contentKey: Any = defaultContentKey(key), metadata: (K) -> Map<String, Any>, content: @Composable (K) -> Unit)

Add an entry provider to the EntryProviderScope

Parameters

key

key for this entry

contentKey

A unique, stable id that uniquely identifies the content of this NavEntry. 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

lambda that takes the key and provides a map of additional info

content

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

Type Parameters

K

the type of the key for this NavEntry


inline fun <K : T> entry(noinline clazzContentKey: (key: @JvmSuppressWildcards K) -> Any = { defaultContentKey(it) }, metadata: Map<String, Any> = emptyMap(), noinline content: @Composable (K) -> Unit)

Add an entry provider to the EntryProviderScope

Parameters

clazzContentKey

A factory of unique, stable ids that uniquely identifies the content of this NavEntry. To maximize stability, it should be derived from the factory's provided key. The resulting key must be saveable (i.e. on Android, it should be saveable via Android). The generated key will be stored in NavEntry.contentKey.

metadata

provides information to the display

content

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

Type Parameters

K

the type of the key for this NavEntry


inline fun <K : T> entry(noinline clazzContentKey: (key: @JvmSuppressWildcards K) -> Any = { defaultContentKey(it) }, noinline metadata: (K) -> Map<String, Any>, noinline content: @Composable (K) -> Unit)

Add an entry provider to the EntryProviderScope

Parameters

clazzContentKey

A factory of unique, stable ids that uniquely identifies the content of this NavEntry. To maximize stability, it should be derived from the factory's provided key. The resulting key must be saveable (i.e. on Android, it should be saveable via Android). The generated key will be stored in NavEntry.contentKey.

metadata

lambda that takes the key and provides a map of additional info

content

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

Type Parameters

K

the type of the key for this NavEntry