Compose Unstyled 2.0 is out! Check the official announcement blog ->
Function

rotate

Sets the degrees the view is rotated around the center of the composable.

RotateSample

@PreviewWrapper(RemoteComponentPreviewWrapper::class)
@Composable
fun RotateSample() {
    RemoteBox(RemoteModifier.rotate(45f.rf).size(100.rdp, 100.rdp).background(Color.Red))
}

Last updated: