This displays correctly using the AsyncImage. But I would like to use it in a IconButton, but the affect is different. See below for IconButton with an Image
AsyncImage(
model = R.drawable.add_photo,
contentDescription = stringResource(R.string.selected_image),
modifier = Modifier
.size(60.dp)
.border(
width = 2.dp,
color = MaterialTheme.colorScheme.photoPickerBorderColor,
shape = RoundedCornerShape(5.dp)
)
.clip(shape = RoundedCornerShape(5.dp)).
clickable {
onAddPhotosClicked()
})
And I am trying to use the IconButton here with an Image with the same properties, just wondering why does it display like this, as it seems to be clipping the corners. Is there anyway to display it like in the AsyncImage
IconButton(
onClick = {
onAddPhotosClicked()
}) {
Image(
painter = painterResource(id = R.drawable.add_photo),
contentDescription = stringResource(id = R.string.add_photos),
modifier = Modifier
.size(60.dp)
.border(
width = 2.dp,
color = MaterialTheme.colorScheme.photoPickerBorderColor,
shape = RoundedCornerShape(5.dp)
)
.clip(shape = RoundedCornerShape(5.dp)),
)
}

