Please find attached image where green lines appears.
Here is the code snippet for the `AsyncImage`:
@Composable
fun *CustomAsyncImage*(
modifier: Modifier = Modifier,
customAsyncImageDisplay: CustomAsyncImageDisplay,
) {
val request =
ImageRequest.Builder(LocalContext.current)
.data(eciAsyncImageDisplay.imageUrl)
.decoderFactory(SvgDecoder.Factory())
.setHeader(_USER_AGENT_, _USER_AGENT_VALUE_)
.setHeader(ACCEPT, _ACCEPT_IMAGE_FORMATS_)
.diskCachePolicy(CachePolicy.ENABLED)
.memoryCachePolicy(CachePolicy.ENABLED)
.build()
AsyncImage(
model = request,
contentDescription = customAsyncImageDisplay.contentDescription,
contentScale = customAsyncImageDisplay.contentScale,
error = painterResource(id = customAsyncImageDisplay.errorPlaceholder),
modifier = _updateModifier_(customAsyncImageDisplay, modifier),
)
}
private fun *updateModifier*(
customAsyncImageDisplay: CustomAsyncImageDisplay,
modifier: Modifier,
): Modifier {
return customAsyncImageDisplay.aspectRatio?.let { ratio ->
customAsyncImageDisplay.shape?.let { shape ->
modifier
._aspectRatio_(ratio)
._clip_(shape)
} ?: modifier._aspectRatio_(ratio)
} ?: customAsyncImageDisplay.shape?.let {
modifier._clip_(it)
} ?: modifier
}