I'm learning Jetpack Compose and I was trying to customize a display of an image with Modifier methods height and padding. But I got the Problem messages "Unresolved reference: height" and "Unresolved reference: padding".
@Preview
@Composable
fun imageDisplay() {
Column(
modifier = Modifier.padding(16.dp)
) {
Image(
painter = painterResource(R.drawable.photo_1505740420928_5e560c06d30e),
contentDescription = null,
modifier = Modifier
.height(180.dp)
.fillMaxWidth()
.clip(shape = RoundedCornerShape(4.dp)),
contentScale = ContentScale.Crop
)
}
}
padding and height methods highlighted in red
Am I missing something?