Class

SemanticsPropertyKey

SemanticsPropertyKey is the infrastructure for setting key/value pairs inside semantics block in a type-safe way.

Source set: Android
public class SemanticsPropertyKey<T>(
    /** The name of the property. Should be the same as the constant from shich it is accessed. */
    public val name: String,
    internal val mergePolicy: (T?, T) -> T? = { parentValue, childValue ->
        parentValue ?: childValue
    },
)

SemanticsPropertyKey is the infrastructure for setting key/value pairs inside semantics block in a type-safe way. Each key has one particular statically defined value type T.

Functions

merge

Source set: Android
public fun merge(parentValue: T?, childValue: T): T?
Jetpack Compose beyond MaterialFree components, screens and templates for apps that don’t look like Google’s. Copy them into your app, or let your coding agent add them.Browse for free

Content updated: