Slide 51
Slide 51 text
改善版
@Composable
private fun Background(
modifier: Modifier = Modifier,
backgroundColor: Color,
toolbarState: CollapsingToolbarState,
) {
Box(
modifier = modifier
.fillMaxSize()
.drawWithCache {
onDrawBehind {
drawRect(
color = backgroundColor,
size = Size(
width = size.width,
height = toolbarState.minHeight + toolbarState.offset,
),
)
}
},
)
}
51