-
-
Save skydoves/c6acdbe0a91b8fc8d2e92079e2da5cbd to your computer and use it in GitHub Desktop.
consume_imageui
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Composable | |
fun ConsumeImageUi( | |
imageUi: ImageUi, | |
modifier: Modifier = Modifier, | |
imageOptions: ImageOptions? = null | |
) { | |
GlideImage( | |
modifier = modifier | |
.size(imageUi.size) | |
.clip(RoundedCornerShape(8.dp)), | |
imageModel = { imageUi.url }, | |
imageOptions = imageOptions ?: ImageOptions( | |
contentScale = imageUi.scaleType.toContentScale(), | |
contentDescription = imageUi.title | |
), | |
previewPlaceholder = painterResource(R.drawable.preview) | |
) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment