Having a panoramic AsyncImage wich I wanna use as ...
# compose
p
Having a panoramic AsyncImage wich I wanna use as a header of my app, inside a lazycolumn (with modifier.fillmaxwidth()), it displays correctly having just the width of the screen. If i switch to a column (also with modifier.fillmaxwidth()), it does wrong. Instead of fitting the width of the screen, the AsyncImage is being painted with all the height of the screen, so it's fitting all and I only can see a portion of the left of the image, because now the width of the image is super big. Why this happens? The column is in the topAppBar of a Scaffold.
Copy code
Column (
    modifier = modifier.fillMaxWidth()
) {
    HeaderComposable(header)
}

@Composable
fun HeaderComposable(header: Header, modifier: Modifier = Modifier) {
    AsyncImage(
        model = header.getImageRoute(),
        contentDescription = "",
        contentScale = ContentScale.Crop,
        modifier = modifier.fillMaxWidth()
    )
}