Composable Function

rememberNamedRemoteFloat

Remembers a named RemoteFloat initialized with defaultValue.

RemoteTextDynamicFontSizeSample

@Sampled
@Preview
@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)
}
Jetpack Compose beyond MaterialFree components, screens and templates for apps that don’t look like Google’s. Copy them into your app, or let your coding agent add them.Browse for free

Content updated: