conditional

fun Modifier.conditional(condition: Boolean, ifTrue: Modifier.() -> Modifier, ifFalse: Modifier.() -> Modifier? = null): Modifier

Apply Modifier conditionally. If the condition is met the ifTrue block will be called otherwise default to ifFalse