@Composable
fun CustomCard2(content: @Composable BoxScope.() -> Unit,
) {
Box(modifier = Modifier.padding(16.dp).fillMaxWidth()) {
content()
}
}
@Composable
fun SlotApiExample2() {
CustomCard2(
content = { Text(text = "This is the content of the card.",modifier = Modifier.align(Alignment.BottomCenter)) },
)
}
01-27
3105
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
05-21
7036
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
12-17
1009
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
08-25
1584
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)