A-Z of Kotlin Flow
summary
Shows how to replace RxJava with Kotlin coroutines + Flow by converting network and database calls into a repository-returned Flow, collecting it in a ViewModel and exposing a private MutableStateFlow as a public StateFlow to drive UI loading/success/error states. Demonstrates using operators like debounce, distinctUntilChanged and flatMapLatest, switching dispatchers (IO/default), and unit testing with runBlockingTest, TestCoroutineDispatcher, MockK and Turbine; sample app and start/end branches on GitHub run end-to-end.
AI-written summary · about
chapters (15)
- 0:00Introduction
- 3:59Why use Kotlin Flow
- 9:01Flow in app architecture
- 12:14State flow explained
- 14:46Flow binding for UI
- 17:40Testing Kotlin Flow
- 20:16Workshop setup
- 21:48Code walkthrough
- 31:48Adding dependencies
- 35:33Network call in repository
- 40:27Mutable state flow in ViewModel
- 43:56Collecting state flow in UI
- 47:21Testing success scenario
- 54:04Testing error scenario
- 1:04:19Q&A








