Skip to content

Instantly share code, notes, and snippets.

@ElifBon
Created April 19, 2020 19:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ElifBon/2c0a387de48e1237e1d657aaac94eddc to your computer and use it in GitHub Desktop.
Save ElifBon/2c0a387de48e1237e1d657aaac94eddc to your computer and use it in GitHub Desktop.
@Composable
fun SpeakerImage(image: ImageAsset?) {
image?.let {
val imageModifier = Modifier
.preferredHeightIn(maxHeight = 180.dp)
.fillMaxWidth()
.clip(shape = RoundedCornerShape(4.dp))
Image(image, modifier = imageModifier, contentScale = ContentScale.Crop)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment