thenIf

inline fun Modifier.thenIf(condition: Boolean, block: Modifier.() -> Modifier): Modifier

Applies a Modifier if the given condition is true.

Marked inline to avoid lambda allocation at the call site.

Return

The updated Modifier.

Parameters

condition

The condition to evaluate.

block

The modifier builder lambda to run if condition is true.