Function

ifSetAs

Call block when property has been provided and the value is of type R.

ifSetAs

Source set: Common
public inline fun <reified R : T, T> StylePropertyAccessorScope.ifSetAs(
    property: StyleProperty<T>,
    crossinline block: (R) -> Unit,
)

Call block when property has been provided and the value is of type R.

Parameters

R the value of R is required to be.
T the type of the property inferred from property
property the property to check.
block called when property has been provided and is called with the resolved value of property as a parameter.

Content updated: