UiText

sealed interface UiText

A sealed interface representing UI text that can be resolved dynamically in Compose or using an Android Context.

Inheritors

Types

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

Represents a raw or dynamic string (e.g., from an API, database, or user input).

Link copied to clipboard
data object Empty : UiText

Represents an empty string.

Link copied to clipboard
class PluralResource(@PluralsRes val resourceId: Int, val count: Int, val args: Any) : UiText

Represents an Android plural string resource ID with quantity and format arguments.

Link copied to clipboard
class Resource(@StringRes val resourceId: Int, val args: Any) : UiText

Represents an Android string resource ID with optional format arguments.

Functions

Link copied to clipboard

Resolves the string value within a Composable context.

open fun asString(context: Context): String

Resolves the string value using an Android Context.