Property

rsp

Extension property to convert an Int to a RemoteTextUnit in Sp.

RemoteTextDynamicFontSizeSample

@Sampled
@PreviewWrapper(RemoteComponentPreviewWrapper::class)
@Composable
fun RemoteTextDynamicFontSizeSample() {
    val fontScale = rememberNamedRemoteFloat("fontScale") { 1.2f.rf }
    val dynamicSize = (16f.rf * fontScale).rsp
    RemoteText(text = "Dynamic Size Text".rs, fontSize = dynamicSize)
}

Content updated: