thenIf

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

Conditionally applies the action to the receiver Modifier if precondition is true. Otherwise, returns the receiver unchanged.