Guilherme Delgado
04/23/2022, 10:24 AMmodifier = Modifier
.fillMaxWidth()
.drawWithCache {
val gradient = Brush.horizontalGradient(colors = listOf(Color.DarkGray, Color.Transparent, Color.DarkGray))
onDrawWithContent {
drawContent()
drawRect(
brush = gradient,
size = size,
blendMode = BlendMode.Darken
)
}
}
In the preview this is rendered correctly, when running the app it’s not, it only draws the Rect “ignoring” the composable in the background. Any idea? 🤔