Sebastian Kürten
07/13/2022, 3:38 PMImage
. That works nicely, images appear in their natural size. However on higher density devices, images appear smaller. Is there any easy way to use the LocalDensity
to render an image the same natural size independent of screen density? I've tried applying Modifier.scale(LocalDensity.current.density)
and while the image seems to be rendered bigger on higher density devices, the size of the widget doesn't seem to increase, i.e. only part of the image is visible. I see that Image
is using an ImagePainter
under the hood, but I don't see an easy way to supply a target size for it. Any suggestions?Kirill Grouchnikov
07/13/2022, 3:40 PMdp
width and height for it?Sebastian Kürten
07/13/2022, 3:49 PMSebastian Kürten
07/13/2022, 3:51 PMKirill Grouchnikov
07/13/2022, 3:52 PMKirill Grouchnikov
07/13/2022, 3:52 PMwrap_content
in the view world. You want to set fixed dp
based dimensions for your image insteadSebastian Kürten
07/13/2022, 4:01 PM