Go with the Flow
summary
Explains how Kotlin Flow is built on suspend functions and two interfaces (emitter + collector), shows operator internals, and demonstrates concrete patterns: stateFlow = sharedFlow with replay 1, using stateIn/shareIn to convert cold flows into hot shared state and callbackFlow + awaitClose for listener wrappers. Covers context preservation and exception transparency, Compose lifecycle-safe collection (collectAsStateWithLifecycle), RxJava ↔ Flow interop via asFlow, and practical testing with TestDispatcher and coroutine-test (mentions turbine as option).
AI-written summary · about
chapters (11)
- 0:00Introduction
- 2:37What are Kotlin flows
- 9:01Flow internals explained
- 13:35Flow operators and use cases
- 17:30State flow vs classic flow
- 23:48Shared flow and hot streams
- 26:43Dispatchers and threading
- 28:49Best practices for flows
- 30:34Flows in Jetpack Compose
- 32:00Migrating from RxJava
- 34:48Testing Kotlin flows
related talks
42mGo with the Flow
36mGo with the Flow
53mGetting into the Flow: building applications with Reactive Streams
44mGoing with the Flow - Using Coroutines 1.3.x
01h 12mA-Z of Kotlin Flow
40mFlowing Things, not so strange in the MVI world
37mFlowing Things, Not So Strange in the MVI World
42mVISUALIZING KOTLIN FLOW IN ANDROID
