thenIfNotNull

fun <T> Modifier.thenIfNotNull(value: T?, ifNotNullModifier: (T) -> Modifier, ifNullModifier: Modifier = Modifier): Modifier

Applies either the ifNotNullModifier or the ifNullModifier depending on the value.

Since

0.2.0

Parameters

value

the nullable value to supply with the Modifier.

ifNotNullModifier

The Modifier to apply if the value is not null.

ifNullModifier

The Modifier to apply if the value is null.