iif

fun Modifier.iif(condition: Boolean, then: Modifier.() -> Modifier): Modifier

Applies the given Modifier if the condition is true.

Return

The original Modifier if the condition is false, otherwise the Modifier returned by then.

Parameters

condition

The condition to check.

then

The Modifier to apply if the condition is true.