`vectorResource` was deprecated with recommendati...
# compose
j
vectorResource
was deprecated with recommendation to use
painterResource
which creates Painter. How to convert
Painter
to
ImageVector
?
a
Why do you need
Painter
 to 
ImageVector
conversion?
j
What is the correct new way to load ImageVector?
a
With the new
painterResource
you're supposed to use
Image(painter = painterResource(R.drawable.drawable_id))
1
1
s
found it!
j
For example
Icons.Default.SomeIcon
still is a Vector Image. I had a list of screens where each screen had an Icon (either a drawable resource, or a built-in compose icon). This no longer works since painterResource returns a Painter, the other one still is a vector Image. So icon would have to be either a Painter or a VectorImage. A way to convert between those two would indeed be nice, so I dont have
if icon is painter Icon(painterResource = icon) else Icon(imageVector = icon)
Not the way I am doing it, but you get the gist.