A practical decision guide, built around a parcel-tracking screen, with exhaustive when as the compile-time safety net for UI state and navigation events.
Picture this composite scenario. A parcel-tracking app ships a new Archived state. The product manager is delighted, QA signs off on the new screen, and two weeks later support tickets start to arrive: archived parcels cannot be shared, the analytics dashboard has a suspicious spike in unknown events, and one screen renders as a blank white rectangle.
Nobody forgot to write code. Everybody forgot a place where code needed to be written. Three when blocks had a friendly little else -> at the bottom, and the compiler, doing exactly what it was told, said nothing.
This post is about choosing the right modeling tool so the compiler does say something. We will build one screen, TrackingScreen, and use it to compare enums, sealed classes, and sealed interfaces. Then we will look at exhaustive when, the weaknesses of Result<T>, what happens when you add a subtype, and the "God State" anti-pattern that makes all of this necessary.
All snippets assume Kotlin 1.9 or newer (for data object and stable entries) and a standard ViewModel plus Jetpack Compose setup. The ideas apply equally to Views.
The running example
Our screen shows one shipment. The vocabulary we need:
data class Shipment(
val trackingNumber: String,
val carrier: Carrier,
val stage: DeliveryStage,
val updatedAt: java.time.Instant,
)
We will define Carrier, DeliveryStage, TrackingUiState, TrackingError, and TrackingEvent as we go. Each one is a different kind of "closed set", and each deserves a different tool.
The whole post in one picture. The rest of this article explains each box and each arrow.
1. Enums: a fixed set with no per-case data
An enum is the right answer when every case has the same shape. A carrier is a name and a phone number, whichever carrier you pick:
enum class Carrier(val displayName: String, val supportPhone: String) {
SWIFTPOST("SwiftPost", "+1-555-0100"),
NORTHWIND("Northwind Freight", "+1-555-0101"),
HARBOR_EXPRESS("Harbor Express", "+1-555-0102"),
}
Sort order is an even purer example: the cases carry only a label and nothing else.
enum class SortOrder(@StringRes val labelRes: Int, val wireName: String) {
NEWEST_FIRST(R.string.sort_newest, "newest"),
OLDEST_FIRST(R.string.sort_oldest, "oldest"),
CARRIER_AZ(R.string.sort_carrier, "carrier");
companion object {
fun fromWire(raw: String?): SortOrder =
entries.firstOrNull { it.wireName == raw } ?: NEWEST_FIRST
}
}
fun SortOrder.comparator(): Comparator<Shipment> = when (this) {
SortOrder.NEWEST_FIRST -> compareByDescending { it.updatedAt }
SortOrder.OLDEST_FIRST -> compareBy { it.updatedAt }
SortOrder.CARRIER_AZ -> compareBy<Shipment> { it.carrier.displayName }
.thenByDescending { it.updatedAt }
}
Two idiomatic details are worth noting. First, prefer entries over values(): it is an immutable list, so there is no defensive array copy on every call. Second, fromWire has an explicit fallback, which brings us to the failure modes.
Where enums go wrong
Failure mode 1: the enum that needs one more field, for one case only. Someone models screen status as enum class Status { LOADING, SUCCESS, ERROR }, and then the error needs a message. The shortcut is a sibling field errorMessage: String? sitting next to the enum. You have just created a state where status == SUCCESS and errorMessage != null is representable. The enum was telling you it was the wrong tool: the moment one case needs data the others do not have, graduate to a sealed type.
Failure mode 2: valueOf on server data. SortOrder.valueOf(raw) throws IllegalArgumentException for a value your app has never heard of, such as one added by the backend last Tuesday. The fromWire pattern above keeps unknown input from crashing the process. If an "unknown" value is semantically meaningful, add an explicit UNKNOWN entry and handle it deliberately.
Failure mode 3: persisting ordinal. If anything in your pipeline stores ordinal (a Bundle.putInt, a hand-written converter, an analytics payload), then inserting an entry in the middle silently shifts the meaning of every stored value after it. Persist a stable identifier such as wireName, never the position.
2. Sealed classes: a closed hierarchy with per-case data
Delivery progress is where an enum starts to strain. “In transit” has a last-scan hub and timestamp. “Out for delivery” has a driver ETA. “Delivered” may have a proof photo. These cases are different shapes, and that is the cue for a sealed type.
Here a sealed class earns its keep because every stage also shares a concrete piece of state, the progress step, which a progress bar needs regardless of which stage we are in:
enum class HoldReason { CUSTOMS, ADDRESS_ISSUE, WEATHER }
sealed class DeliveryStage(val step: Int) {
data object LabelCreated : DeliveryStage(step = 0)
data class InTransit(
val hub: String,
val lastScan: java.time.Instant,
) : DeliveryStage(step = 1)
data class Held(val reason: HoldReason) : DeliveryStage(step = 1)
data class OutForDelivery(val eta: java.time.Instant) : DeliveryStage(step = 2)
data class Delivered(
val at: java.time.Instant,
val proofPhotoUrl: String?,
) : DeliveryStage(step = 3)
}
Notice that an enum (HoldReason) lives inside a sealed hierarchy. These tools compose: sealed types for cases with different payloads, enums for the leaf values that are just labels.
A sealed class can hold constructor parameters, backing fields, and concrete implementation, and its constructor is protected by default, so the hierarchy truly is closed. That is its advantage over an interface, which cannot own a backing field.
Where sealed classes go wrong
Failure mode 1: plain object for singletons. Prior to data object, object LabelCreated printed as DeliveryStage$LabelCreated@3f2a1b, which is awful in logs and crash reports. Use data object; you get a readable toString() and consistent equals/hashCode semantics.
Failure mode 2: the “extension point” that doesn’t exist. All direct subclasses of a sealed type must live in the same package and the same module as the sealed type itself. Teams in modularized apps sometimes put sealed class DeliveryStage in :core:model and try to add a Customs subclass from :feature:international. The compiler refuses. That restriction is the feature (it is what makes the hierarchy closed and the when checkable), so do not fight it. Section 3 shows what to do instead.
Failure mode 3: using a sealed class when nothing is shared. If your base class has no constructor parameters and no members, you are paying for single inheritance and getting nothing. Prefer the interface.
3. Sealed interfaces: multiple inheritance and module boundaries
A sealed interface has the same closedness guarantee, but with two practical differences. Subtypes can implement several sealed interfaces at once, and there is no constructor or state to inherit. For UI state and one-shot events, that is usually exactly what you want, which is why my default is the interface.
Navigation and side-effect events are a natural fit:
sealed interface TrackingEvent {
data object GoBack : TrackingEvent
data class OpenProof(val url: String) : TrackingEvent
data class CallCarrier(val phone: String) : TrackingEvent
}
Multiple parents, used for real
Errors show where multiple inheritance pays off. Some errors the user can retry; some are permanent. “Retryable” is a cross-cutting property, not a branch in the hierarchy:
sealed interface TrackingError {
data object Offline : TrackingError, Retryable
data class CarrierDown(val carrier: Carrier) : TrackingError, Retryable
data class UnknownNumber(val number: String) : TrackingError
}
sealed interface Retryable
With a sealed class you would have to pick one parent or invent an awkward diamond of abstract classes. With interfaces, CarrierDown just is both things, and the UI asks the question it cares about:
val canRetry = state.error is Retryable
Both interfaces are sealed and live in the same file, so exhaustiveness holds for each independently: when (error) is checked against TrackingError, and when (r) is checked against Retryable.
What “cross-module” really means
Be precise here, because this is the most commonly misunderstood part. Sealed hierarchies are closed per module:
-
Consuming a sealed type from another module works perfectly.
:feature:trackingcanwhenoverTrackingErrordefined in:core:model. - Extending it from another module does not.
If your features genuinely need to contribute their own cases to a shared channel (for example a global event bus), model that explicitly: a small sealed interface for the closed, app-wide cases, plus one wrapper case that carries an open interface.
// :core:navigation
interface FeatureEvent // open: features implement this
sealed interface AppEvent {
data object SignedOut : AppEvent
data class FromFeature(val event: FeatureEvent) : AppEvent
}
// :feature:tracking
sealed interface TrackingFeatureEvent : FeatureEvent {
data class ParcelArchived(val number: String) : TrackingFeatureEvent
}
Each feature keeps its own exhaustive when over its own sealed interface, and the shared layer stays open only at the single seam where it has to be.
Failure mode: stale binaries. Inside one Gradle build, adding a subtype triggers recompilation of dependents, so you get the compile error you want. But when a sealed type crosses a published boundary (an internal library pulled in as a prebuilt artifact, or a dynamic feature built and shipped separately), a consumer compiled against the old version can meet a subtype it has never heard of. A compiled when expression ends in a throw for unmatched values, and that surfaces at runtime as NoWhenBranchMatchedException. If a sealed type crosses a versioning boundary, treat adding a subtype as a breaking change and version accordingly.
Capability comparison. The bottom row is the point: all three give you exhaustive when, so choose based on the other rows.
4. Exhaustive when as an expression, and why to avoid else
Everything above exists to enable one thing: when the subject of a when is an enum, a sealed type, or a Boolean, the compiler can prove that you covered every case, but only if you do not hand it an escape hatch.
Here is the smell, written the way it tends to appear in real code:
// ✗ Compiles today, and still compiles after you add a new event
fun TrackingEvent.analyticsName(): String = when (this) {
is TrackingEvent.OpenProof -> "open_proof"
is TrackingEvent.CallCarrier -> "call_carrier"
else -> "unknown"
}
GoBack silently becomes "unknown". Worse, when the next teammate adds ShareLink, it becomes "unknown" too, and nothing in the build tells them this function exists. Now the same function, written so the compiler can help:
// ✓ Adding a subtype is a compile error here until you decide
fun TrackingEvent.analyticsName(): String = when (this) {
TrackingEvent.GoBack -> "go_back"
is TrackingEvent.OpenProof -> "open_proof"
is TrackingEvent.CallCarrier -> "call_carrier"
}
Note that data objects match by equality (TrackingEvent.GoBack ->) while data classes need is. Both are fine.
The rules I apply in code review
-
Prefer
whenas an expression. Assigning it, returning it, or using it as a function body makes it a value the program needs, which keeps it honest. Since Kotlin 1.7, awhenstatement over a sealed, enum, orBooleansubject is also required to be exhaustive, so the old.exhaustiveextension hack is obsolete. Expression form is still better because the result type is checked too. -
No
elseover a closed type. Group cases explicitly instead:A, B -> doThing(). Grouping states "these cases behave identically today";elsestates "and anything that ever exists." -
elseis fine for open types.String,Int, and non-sealed hierarchies have no closed set to check, soelseis correct there. -
Snapshot the subject once.
when (val s = state.value)rather than readingstate.valuein the subject and again in a branch; the value can change between reads. -
Beware
if (x is A) … else if (x is B) …. Anifchain gets no exhaustiveness check, ever. When you are discriminating on a closed type, reach forwhen.
In the UI layer
@Composable
fun TrackingScreen(
state: TrackingUiState,
onRetry: () -> Unit,
onRefresh: () -> Unit,
) {
when (state) {
TrackingUiState.Loading -> FullScreenSpinner()
is TrackingUiState.Content -> ShipmentDetails(state.shipment, state.refresh, onRefresh)
is TrackingUiState.Failed -> ErrorPane(
error = state.error,
onRetry = onRetry.takeIf { state.error is Retryable },
)
}
}
And for one-shot events, the handler is a when too:
@Composable
fun TrackingEventHandler(
events: Flow<TrackingEvent>,
onBack: () -> Unit,
openUrl: (String) -> Unit,
dial: (String) -> Unit,
) {
// Keep the collector alive across recompositions without capturing stale lambdas.
val currentOnBack by rememberUpdatedState(onBack)
val currentOpenUrl by rememberUpdatedState(openUrl)
val currentDial by rememberUpdatedState(dial)
val lifecycleOwner = LocalLifecycleOwner.current
LaunchedEffect(events, lifecycleOwner) {
// Only act on events while the screen is at least STARTED.
lifecycleOwner.repeatOnLifecycle(Lifecycle.State.STARTED) {
events.collect { event ->
when (event) {
TrackingEvent.GoBack -> currentOnBack()
is TrackingEvent.OpenProof -> currentOpenUrl(event.url)
is TrackingEvent.CallCarrier -> currentDial(event.phone)
}
}
}
}
}
(LocalLifecycleOwner comes from androidx.lifecycle.compose in recent lifecycle releases.) Two details in that handler matter. A bare LaunchedEffect is tied to the composition, not to the lifecycle, so without repeatOnLifecycle it would keep collecting after the app is backgrounded and could fire navigation or dialogs while the screen is invisible. And without rememberUpdatedState, the effect would keep calling the lambdas from the first composition.
On the ViewModel side, one common delivery mechanism is a Channel(BUFFERED) exposed with receiveAsFlow(). Events sent while nobody is collecting (a configuration change, or the app being stopped) wait in the buffer and are delivered when collection resumes. A SharedFlow with no replay would drop them. Be honest about the guarantees, though: delivery is at most once. If the collector is cancelled after receiving an event but before handling it, that event is gone, and the buffer is finite. For commands where losing one is acceptable (open a screen, show a snackbar) that is a fine trade.
There is a second, equally valid approach, and it is the one Google’s architecture guidance leans toward: treat the event as part of state. The state holds a single pending event, the UI handles it, then calls back to say it was handled (onEventHandled()), which clears it. That gives you stronger delivery guarantees at the price of more ceremony. Either way, the model of the event itself is the same sealed interface, and the when that consumes it is exhaustive.
5. Loading / Success / Error, and why Result<T> is too weak
The classic trio is a fine starting point, and for a trivial screen, Loading | Success<T> | Error is enough. The trouble is that real screens outgrow it quickly, and kotlin.Result<T> is even weaker than the trio.
Result describes the outcome of one call. A screen has a history: data, then a refresh, then a failed refresh, all at once.
Let me walk through the specific weaknesses.
It has no “loading”. People reach for StateFlow<Result<Shipment>?> and let null mean loading. That is a convention in someone's head, not a type.
The failure side is Throwable. The UI cannot exhaustively switch on "what went wrong". You end up with when (e) { is IOException -> …; else -> … } and the else is back.
It cannot hold “data and an error”. Pull-to-refresh failing should keep the stale parcel on screen and show a snackbar. A Result is success or failure.
runCatching swallows cancellation. This one has caused real production bugs. Inside a coroutine, runCatching { api.track(number) } catches CancellationException, so a cancelled scope keeps running code it should have stopped. If you must use Result, use a cancellation-aware wrapper:
import kotlin.coroutines.cancellation.CancellationException
inline fun <T> suspendRunCatching(block: () -> T): Result<T> =
try {
Result.success(block())
} catch (e: CancellationException) {
throw e
} catch (e: Throwable) {
Result.failure(e)
}
The function is inline, exactly like the standard runCatching, so the lambda can contain suspending calls whenever the caller is itself a suspend function. The import is not optional: CancellationException is not in Kotlin's default imports. On the JVM it is the same class as java.util.concurrent.CancellationException and kotlinx.coroutines.CancellationException, so any of the three imports behaves identically on Android.
A domain model instead
First, the repository speaks in domain terms. It translates exceptions into TrackingError once, at the boundary, so no Throwable ever reaches the UI:
sealed interface Lookup {
data class Found(val shipment: Shipment) : Lookup
data class Failed(val error: TrackingError) : Lookup
}
interface TrackingRepository {
suspend fun lookup(trackingNumber: String): Lookup
}
Then the screen state captures what the screen actually needs, including the “stale data plus a failed refresh” case that Result cannot express:
sealed interface Refresh {
data object Idle : Refresh
data object InFlight : Refresh
data class Failed(val error: TrackingError) : Refresh
}
sealed interface TrackingUiState {
data object Loading : TrackingUiState
data class Content(
val shipment: Shipment,
val refresh: Refresh = Refresh.Idle,
) : TrackingUiState
data class Failed(val error: TrackingError) : TrackingUiState
}
And the ViewModel’s reducer is exhaustive on both the input and the previous state:
class TrackingViewModel(
private val repository: TrackingRepository,
private val trackingNumber: String,
) : ViewModel() {
private val _state = MutableStateFlow<TrackingUiState>(TrackingUiState.Loading)
val state: StateFlow<TrackingUiState> = _state.asStateFlow()
private val _events = Channel<TrackingEvent>(Channel.BUFFERED)
val events: Flow<TrackingEvent> = _events.receiveAsFlow()
private var refreshJob: Job? = null
fun refresh() {
// Latest call wins: a slow, stale lookup can never overwrite a newer result.
refreshJob?.cancel()
refreshJob = viewModelScope.launch {
_state.update { current ->
when (current) {
is TrackingUiState.Content -> current.copy(refresh = Refresh.InFlight)
is TrackingUiState.Failed, TrackingUiState.Loading -> TrackingUiState.Loading
}
}
when (val lookup = repository.lookup(trackingNumber)) {
is Lookup.Found -> _state.update { TrackingUiState.Content(lookup.shipment) }
is Lookup.Failed -> _state.update { current ->
when (current) {
is TrackingUiState.Content ->
current.copy(refresh = Refresh.Failed(lookup.error))
is TrackingUiState.Failed, TrackingUiState.Loading ->
TrackingUiState.Failed(lookup.error)
}
}
}
}
}
fun onProofClicked(url: String) {
_events.trySend(TrackingEvent.OpenProof(url))
}
}
Each update is atomic, but the network call between the two updates is not, so overlapping refresh() calls (a double tap, or pull-to-refresh racing a retry button) can finish out of order. Cancelling the previous job makes the newest request the only one allowed to write. This relies on repository.lookup being cancellable, which any suspend network call built on a coroutine-aware client is. If you would rather ignore a second tap than restart, check refreshJob?.isActive == true and return instead.
Look at what the reducer decides: a failed first load becomes a full-screen error, but a failed refresh keeps the content and records the failure inside it. That is a product decision, and it is written in the type system rather than in a pile of boolean checks.
A caveat about generics: a reusable UiState<out T> wrapper is reasonable for genuinely simple screens. It gets painful when the screen is composed from two data sources, because you end up with UiState<Pair<A, B>> and a combinatorial explosion in your head. When that happens, stop generalizing and write the specific sealed type.
6. Adding a subtype and watching the compiler list every place to update
This is the payoff. Product asks for archived parcels, so we add one line:
sealed interface TrackingUiState {
data object Loading : TrackingUiState
data class Content(/* … */) : TrackingUiState
data class Failed(val error: TrackingError) : TrackingUiState
data class Archived(val summary: ArchiveSummary) : TrackingUiState // new
}
Now build. With explicit branches everywhere, the compiler produces a to-do list, one entry per place that has to make a decision (wording varies slightly between Kotlin versions):
TrackingScreen.kt:14 'when' expression must be exhaustive: add the 'is Archived' branch
TrackingViewModel.kt:31 'when' expression must be exhaustive: add the 'is Archived' branch
TrackingViewModel.kt:44 'when' expression must be exhaustive: add the 'is Archived' branch
TrackingAnalytics.kt:9 'when' expression must be exhaustive: add the 'is Archived' branch
You cannot forget a call site, and you did not need to grep. Each error is also a prompt for a product question: should an archived parcel be refreshable? Should it be shareable? What name should analytics log?
The same change, in two codebases. On the left, the build breaks until every site decides. On the right, it passes, and the bugs go to production.
Now the codebase from the opening scenario, where someone wrote this:
fun TrackingUiState.shareText(): String? = when (this) {
is TrackingUiState.Content -> "Parcel ${shipment.trackingNumber}: step ${shipment.stage.step + 1} of 4"
else -> null
}
This compiles after Archived is added. The share button, which presumably hides when shareText() is null, silently disappears for archived parcels. If that was a deliberate decision, write it down by naming the cases: is TrackingUiState.Failed, TrackingUiState.Loading, is TrackingUiState.Archived -> null. Naming them is documentation, and it will fail loudly the next time a case is added.
Make the build enforce it
- Turn on
allWarningsAsErrorsin CI so that new compiler diagnostics, including ones that only appear as warnings in your Kotlin version, fail the build instead of scrolling past. - Keep
elseout of closedwhens with a lint rule or a code-review checklist. A search forelse ->in files that mention your state types is a cheap audit.
Where the compiler cannot help
Deserialized data. If a sealed hierarchy is deserialized from JSON (polymorphic kotlinx.serialization, or Moshi's sealed adapter), an unknown discriminator from a newer server throws at parse time, which is a crash or a failed request, not a compile error. Wire models should include an explicit Unknown case, or a configured fallback, and be mapped into your UI types at the data-layer boundary. The UI hierarchy should stay free of "unknown" placeholders.
Version skew. Covered in Section 3: published artifacts can bring back NoWhenBranchMatchedException.
7. Anti-pattern: the God State class with ten fields
You have probably seen this class. It is where every screen goes when the team does not yet trust sealed types:
data class TrackingUiState(
val isLoading: Boolean = false,
val isRefreshing: Boolean = false,
val shipment: Shipment? = null,
val errorMessage: String? = null,
val retryAfterSeconds: Int? = null,
val unknownNumber: String? = null,
val proofPhotoUrl: String? = null,
val mapQuery: String? = null,
val callDialogPhone: String? = null,
val carrierPhone: String? = null,
)
Ten fields, eight of them nullable. It looks flexible and it is the opposite.
Left: at least 1,024 combinations, a handful of which mean anything. Right: three phases, each with only the data that phase can have.
What goes wrong
Impossible states are representable. isLoading = true while shipment != null and errorMessage != null: which does the screen render? The answer lives in whatever order the if statements happen to appear in your composable, and that order is a bug waiting for a refactor.
Every update must remember to reset the others. To move from error to loading you must clear errorMessage, retryAfterSeconds, and unknownNumber. Forgetting one produces an error banner that outlives its error. Nothing warns you.
One-shot events masquerading as state. mapQuery, callDialogPhone, and proofPhotoUrl are really commands: "open the map now". Stored as state, they re-fire on rotation and on re-collection, so the map opens twice. The common patch is a onMapOpened() callback that nulls the field, which is a hand-rolled event bus with a race condition. These are commands, not state. Deliver them as a TrackingEvent (Sections 3 and 4), either through a stream or, if you follow Google's events-as-state guidance, as a single explicit pending-event value that the UI handles and acknowledges. What you should never do is scatter them across nullable fields with a hand-written reset for each.
Nothing is exhaustive. There is no when to check. Adding an eleventh field breaks nothing and informs nobody.
The fix, and the opposite trap
Split the God State along one axis: mutually exclusive phases become subtypes; independent attributes remain fields. The resulting state is the sealed TrackingUiState from Section 5, and the one-shot fields move into TrackingEvent.
Do not over-correct, though. Not everything on a screen is a phase. The current sort order, a search query, or the selected tab can all change regardless of whether the content is loading, loaded, or failed. Promoting those into sealed subtypes would force you to copy them into every case. Keep them as plain fields, beside the sealed phase:
data class TrackingScreenState(
val sort: SortOrder = SortOrder.NEWEST_FIRST, // independent: enum field
val phase: TrackingUiState = TrackingUiState.Loading, // exclusive: sealed
)
One more practical tip: updating a sealed state that you need to modify only if it is in a certain phase is a very common operation. Wrap it once so call sites stay short:
inline fun <reified S : TrackingUiState> MutableStateFlow<TrackingUiState>.updateIf(
transform: (S) -> TrackingUiState,
) = update { current -> if (current is S) transform(current) else current }
// usage
_state.updateIf<TrackingUiState.Content> { it.copy(refresh = Refresh.Idle) }
A short checklist
- Every case has the same fields? Use an enum. Persist by stable name, never by ordinal, and give server-driven enums a fallback.
- Cases have different payloads? Use a sealed type. Start with a sealed interface.
- Cases share constructor state or need a protected constructor? Use a sealed class.
- A case belongs to more than one family? That is the sealed interface’s job.
- Does the set need to grow from another module? Sealed cannot do it. Use a wrapper case around an open interface.
-
Writing
whenover any of these? Make it an expression, name every case, and leave outelse. - Is your state class growing nullable fields? Ask which ones can never be non-null together. Those are your subtypes.
The point of all this is not purity. It is that a compiler is a tireless reviewer who sees every file, and an exhaustive when is how you give it something specific to check. Every else -> you delete is one more place where the next teammate's mistake becomes a build error instead of a support ticket.
🍎 Share Your Kotlin Code with iOS — Without Rewriting Your App
If “we’ll just build it twice, once per platform” describes how your team ships mobile, I’d recommend “Kotlin Multiplatform for Android Developers” — a 22-chapter, hands-on guide that goes past the sample-project demos and follows the shared module all the way to two app store submissions. No iOS or Swift background required.
It walks through the expect/actual mechanism and source set hierarchy, shared architecture, networking with Ktor, persistence with Room KMP and SQLDelight, Koin dependency injection, Flow and StateFlow with Swift interop (SKIE and Swift Export), Compose Multiplatform versus native SwiftUI, navigation, testing across two runtimes, dual-toolchain CI/CD with Linux and macOS runners, publishing a KMP library, and migrating an existing Android app module by module. Everything builds toward one capstone: an offline-first Expense/Budget Tracker, complete with a pending-sync queue, retry/backoff, and a deployment checklist for both stores.
- E-book: Available on Google Play
- Kindle Edition: Available on Amazon
- Topmate: Available on Topmate
- Also available in Paperback & Hardcover.
Originally published on Medium.





Top comments (0)