ifNull
Modifier to make it easy to conditionally add a modifier based on value nullability
Box(
modifier = Modifier.fillMaxWidth()
.ifNull(errorMetadata) { errorData -> background(errorData.valid) }
.padding(16.dp)
) {...}
Content copied to clipboard