Arch Event Observer¶
Arch Event Observer is a Kotlin-first event and result observation toolkit for Android and Compose Multiplatform.
The repository is split into three public modules:
event-observerforDataResult,ResponseLiveData,ResponseFlow, and reactive helpersevent-observer-composefor snapshot and Flow-driven Compose renderingevent-observer-statefor saved screen state and repository operations
This branch documents the 3.0.0 API. See GitHub Releases for publication status and use the documentation from the Git tag matching your installed version. See the Compose migration guide.
Version 3.0.0 includes Compose API changes and privately owned State keys. See state migration and release notes.
What You Get¶
- A single
DataResult<T>model for success, loading, error, and neutral states - LiveData wrappers for Android UI layers
- Flow wrappers for shared state and coroutine-based pipelines
- Compose helpers for declarative rendering without manual
whenblocks - published docs that stay aligned with the shipped public API
Choose Your Module¶
event-observerfor the base model, LiveData, and Flow supportevent-observer-composefor Compose rendering on top of the base moduleevent-observer-statefor restorable shared screen state
Start Here¶
- Getting Started
- event-observer
- event-observer-compose
- event-observer-state
- Core Concepts
- Recipes
- API Reference
- Changelog
- Contributing
Quick Example¶
val result = dataResultSuccess("Hello")
result.unwrap {
data { value -> println(value) }
error { throwable -> println(throwable.message) }
}
myFlow.Content {
OnShowLoading { CircularProgressIndicator() }
OnData { value -> Text(value.toString()) }
OnError { error -> Text(error.message ?: "Unknown error") }
}
Scope¶
This project keeps the API focused on observation and rendering. It does not try to replace your repository, state holder, or UI architecture.
Saved screen state¶
event-observer-state connects repository operations to restorable View state. See the Toolkit migration guide.