How can I draw an image now that DrawImage is gone...
# compose
a
How can I draw an image now that DrawImage is gone?
v
use
ImagePainter
k
What do you pass that ImagePainter to?
v
This is how I was able to display an image, although would like to know if there's a better way to do it.
Copy code
val image = loadImageResource(resId)
image.resource.resource?.let {
    Box(modifier = LayoutHeight(200.dp) + LayoutWidth.Fill + ImagePainter(it)
        .toModifier()) {
    }
}
k
Thanks @Vinay Gaba it works.
v
🙌🏼
l
There will be an Image component in the next release that does this for you