thenIf

inline fun Modifier.thenIf(precondition: Boolean, action: Modifier.() -> Modifier): Modifier

Conditionally applies the action to the receiver Modifier, if precondition is true. Returns the receiver as-is otherwise.