🌈 Create new beautiful Compose Gradients with our new wesite ->
Class

SemanticsMatcher

Wrapper for semantics matcher lambdas that allows to build string explaining to the developer what conditions were being tested.

Source set: Common
public class SemanticsMatcher(
    public val description: String,
    private val matcher: (SemanticsNode) -> Boolean,
)

Wrapper for semantics matcher lambdas that allows to build string explaining to the developer what conditions were being tested.

Functions

matches

Source set: Common
public fun matches(node: SemanticsNode): Boolean

Returns whether the given node is matched by this matcher.

matchesAny

Source set: Common
public fun matchesAny(nodes: Iterable<SemanticsNode>): Boolean

Returns whether at least one of the given nodes is matched by this matcher.

and

Source set: Common
public infix fun and(other: SemanticsMatcher): SemanticsMatcher

or

Source set: Common
public infix fun or(other: SemanticsMatcher): SemanticsMatcher

not

Source set: Common
public operator fun not(): SemanticsMatcher

Members

Companion

Source set: Common
public companion object

Functions

expectValue

Source set: Common
public fun <T> expectValue(
            key: SemanticsPropertyKey<T>,
            expectedValue: T,
        ): SemanticsMatcher

Builds a predicate that tests whether the value of the given key is equal to expectedValue.

keyIsDefined

Source set: Common
public fun <T> keyIsDefined(key: SemanticsPropertyKey<T>): SemanticsMatcher

Builds a predicate that tests whether the given key is defined in semantics.

keyNotDefined

Source set: Common
public fun <T> keyNotDefined(key: SemanticsPropertyKey<T>): SemanticsMatcher

Builds a predicate that tests whether the given key is NOT defined in semantics.