conditional

fun Modifier.conditional(condition: Boolean, modifier: Modifier.() -> Modifier): Modifier

Applies a modifier conditionally based on a boolean value.

Return

The modified Modifier

Parameters

condition

The condition that determines whether to apply the modifier

modifier

The modifier to apply if the condition is true