I'm learning Composed and tried to load an image from the internet using coil3.
@Composable
fun Test() {
val imageUrl = "https://www.gstatic.com/webp/gallery/4.jpg"
val imageRequest = ImageRequest.Builder(LocalPlatformContext.current)
.data(imageUrl)
.size(Size.ORIGINAL)
.build()
Surface (modifier = Modifier.fillMaxSize()) {
AsyncImage(
model = imageRequest,
contentDescription = "Test Image",
modifier = Modifier.fillMaxSize().size(80.dp),
error = painterResource(R.drawable.resized_image_1)
)
}
}
I also tried to use rememberAsyncImagePainter() but the image in the error is rendered Permissions for internet is give. Am i mission anything here thanks