Function

ifSet

Call block when property has been provided.

ifSet

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

Call block when property has been provided.

Parameters

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: