Function

liveLiteral

Constructs a State object identified by the provided global key and initialized to the provided value.

liveLiteral

Source set: Common
public fun <T> liveLiteral(key: String, value: T): State<T>

Constructs a State object identified by the provided global key and initialized to the provided value. This value may then be updated from tooling with the updateLiveLiteralValue API. Only a single State object will be created for any given key.

Caution: This API is intended to be used by tooling only. Use at your own risk.

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: