setVariable

fun <T : StylePropertyValue> Modifier.setVariable(variable: StyleVariable.PropertyValue<T>, value: T?): Modifier(source)

Set the value of a variable.

If the value passed in is null, this method is a no-op. This approach is supported since it is common to have methods that take a nullable parameter which should only override some value if non-null.

See also