Row(modifier =
Modifier
.background(
Brush.linearGradient(
listOf(Blue700, Blue200)
))
content()
}
如果有更高的要求 可以使用这种写法
.background(
brush = Brush.verticalGradient(
colors = listOf(Color.Transparent, Color.White),
startY = 0f,
endY = Float.POSITIVE_INFINITY
)
)