- UiText sealed interface (DynamicString / StringResource) — Compose-free type so the UI-agnostic presentation module can hold UiText? in state without depending on Compose. - Two resolvers: @Composable UiText.asString() (Compose renderer) and UiText.asString(context) (Views renderer). - ObserveAsEvents: lifecycle-aware one-time event collection on Main.immediate. - DataError.toUiText() covering all displayed cases with else -> unknown; error strings here.
17 lines
415 B
Kotlin
17 lines
415 B
Kotlin
plugins {
|
|
alias(libs.plugins.architecture.android.library)
|
|
alias(libs.plugins.architecture.compose)
|
|
}
|
|
|
|
android {
|
|
namespace = "com.example.architecture.core.presentation"
|
|
}
|
|
|
|
dependencies {
|
|
implementation(project(":core:domain"))
|
|
|
|
implementation(libs.androidx.lifecycle.runtime.compose)
|
|
implementation(libs.androidx.lifecycle.runtime.ktx)
|
|
implementation(libs.kotlinx.coroutines.android)
|
|
}
|