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.
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: