Created
August 25, 2021 19:26
-
-
Save rubenquadros/c0ec9a51425624e2895b0203f17322c7 to your computer and use it in GitHub Desktop.
Game Image
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 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