UiText

sealed interface UiText(source)

Unresolved text retained by the platform-neutral tree.

Runtime adapters resolve values only at their platform boundary. Exhaustive visitors must handle every variant, including WithFont. A visitor compiled against a smaller variant set can fail when it receives an unknown variant even when the older JVM members remain available.

Inheritors

Types

Link copied to clipboard
object Companion

Factory methods for retaining text composition.

Link copied to clipboard
class Concatenated(parts: List<UiText>) : UiText

A concatenation whose parts remain individually unresolved.

Link copied to clipboard
data class Literal(val value: String) : UiText

A text value that needs no lookup.

Link copied to clipboard
data class Platform(val payload: PlatformText) : UiText

A typed platform payload retained without interpreting its ownership or namespace.

Link copied to clipboard
class Translated(val key: String, arguments: List<UiTextArgument> = emptyList(), val fallback: TranslationFallback = TranslationFallback.UseKey) : UiText

A translation key with typed arguments and a non-null fallback policy.

Link copied to clipboard
data class WithFont(val text: UiText, val font: ResourceId) : UiText

Text carrying a resource-pack font identifier without resolving or owning the font resource.

Functions

Link copied to clipboard

Retains this text with a resource-pack font identifier without loading resources or changing its content.