UiLocals

Reads typed local values from the current thread-scoped composition context.

Functions

Link copied to clipboard
fun <T> current(local: UiLocal<T>): T

Returns the nearest provided local value, or evaluates its default during declaration. Presence and nullability are distinct: explicitly providing null for a nullable Local returns null and never falls through to a non-null default.