Browse topics
Kotlin Coroutines
Kotlin Flow
Cold flows, operators, StateFlow and SharedFlow basics.
kotlin flowFlow Basics in KotlinFlow emits multiple values asynchronously like a stream. A Kotlin example with source code and sample output.kotlin flowCold Flow in KotlinCold flow starts emitting only when collector begins. A Kotlin example with source code and sample output.kotlin flowFlow collect in Kotlincollect is terminal operator that receives emitted values. A Kotlin example with source code and sample output.kotlin flowFlow Operators in KotlinOperators such as map and filter transform flow values. A Kotlin example with source code and sample output.kotlin flowStateFlow in KotlinStateFlow holds and emits latest state to collectors. A Kotlin example with source code and sample output.kotlin flowSharedFlow in KotlinSharedFlow emits events to multiple collectors. A Kotlin example with source code and sample output.
Related topics
Coroutine Basics Introduction, suspend functions, launch, runBlocking and coroutine scope. Dispatchers Main, IO, Default dispatchers and withContext for thread switching. Async & Await async builder, await, parallel work and exception handling. Advanced Coroutines Coroutine cancellation, channels and producer-consumer patterns.