Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Game Image
@Composable
fun GameImage(
image: String,
modifier: Modifier = Modifier
) {
Image(
modifier =
modifier
.fillMaxWidth()
.height(300.dp)
.graphicsLayer {
clip = true
shape = BottomRoundedArcShape()
shadowElevation = 50.dp.toPx()
},
contentScale = ContentScale.Crop,
painter =
rememberImagePainter(
data = image,
builder = {
placeholder(R.drawable.app_logo)
crossfade(true)
}
),
contentDescription = "Game Image"
)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment