thenIf

fun Modifier.thenIf(condition: Boolean, ifTrueModifier: Modifier, ifFalseModifier: Modifier = Modifier): Modifier

Applies either the ifTrueModifier or the ifFalseModifier depending on the condition.

Since

0.2.0

Parameters

condition

to evaluate which Modifier should be applied.

ifTrueModifier

The Modifier to apply if the condition equals true.

ifFalseModifier

The Modifier to apply if the condition equals false.