ifNotNull
inline fun <T : Any> ERROR CLASS: Symbol not found for Modifier.ifNotNull(value: T?, chain: ERROR CLASS: Symbol not found for Modifier.(T) -> ERROR CLASS: Symbol not found for Modifier): ERROR CLASS: Symbol not found for Modifier
Modifier to make it easy to conditionally add a modifier based on value nullability
Box(
modifier = Modifier.fillMaxWidth()
.ifNotNull(errorMetadata) { errorData -> background(errorData.color) }
.padding(16.dp)
) {...}Content copied to clipboard