I'm using coil library to load images in my composable view and I want to define fix height and width for my coil Image composable, however the modifier is missing in the coil Image composable class, following is the code snippet I'm using.
AsyncImage(
model = limit.imgUrl,
contentDescription = null
)
How I can make the width and height fixed irrespective of the image resolution.
CodePudding user response:
Just apply modifier = Modifier.height(xx.dp).width(xx.dp)
to the AsyncImage
:
AsyncImage(
//...
modifier = Modifier.height(300.dp).width(100.dp)
)