thenIf

fun Modifier.thenIf(predicate: Boolean, modify: () -> Modifier): Modifier

Applies a Modifier if the given predicate is true.

Return

The original Modifier if predicate is false, otherwise the result of applying modify to the original Modifier.

Parameters

predicate

The condition to check.

modify

The Modifier to apply if predicate is true.