I'm storing a material icon in a data class like so:
import androidx.compose.ui.graphics.vector.ImageVector
data class Item(
val icon: ImageVector
)
val item = Item(Icons.Filled.Send)
The item is later passed to a composable where it's drawn using a VectorPainter.
How do I rotate the ImageVector by 90 degrees? Ideally this would result in an ImageVector that I can still store in the data class.

You can build a rotated
ImageVectorcopying all the groups and paths from the sourceImageVector, and applying required rotation parameter (combined with correct values ofpivotX/pivotYthat determines the center point of rotation).The usage can look like this: