I have a drawable and want it to respect the direc...
# compose
e
I have a drawable and want it to respect the direction (LTR, RTL). I found the autoMirrored option to put on the XML, but this drawable is used in the Android View, and we have handled this. Is there a way to do this in the Icon composable?
t
maybe this?
Copy code
fun Modifier.mirror(): Modifier {
    if (Locale.getDefault().layoutDirection == LayoutDirection.RTL)
        return this.scale(scaleX = -1f, scaleY = 1f)
    else
        return this
}