Tag: Kotlin
All the articles with the tag "Kotlin".
-
map vs flatMapConcat in Kotlin Flow — When Your Transformation Returns a Flow
Learn the exact difference between map and flatMapConcat in Kotlin Flow — when to use each, what their transform return types mean, and how to chain serial network calls correctly.
-
flowOn: How Kotlin Flow Controls Which Thread Your Operators Run On
Learn how flowOn acts as a thread bridge in Kotlin Flow, which operators run on which dispatcher, and the most common mistake developers make when assuming IO work runs on the IO thread.
-
How Kotlin Flow Works Internally — Upstream, Downstream, and the Operator Chain
Understand how Kotlin Flow is built internally — the Function and Collector interfaces, upstream vs downstream, the operator chain, SAM interfaces, cold Flow, and single vs multiple emissions.
-
Coroutine Dispatchers, Scopes, launch vs async, and Exception Handling in Android
Master Kotlin coroutine dispatchers (Main.immediate vs Main), lifecycle-aware scopes, when to use launch vs async vs withContext, job cancellation, and how exceptions propagate differently in each builder.