~/talk

A-Z of Kotlin Flow

Talkat droidcon Berlin 2021 · 2021-10-20..10-22· [kotlin, reactive-programming]
slides:none on file

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

  1. 0:00Introduction
  2. 3:59Why use Kotlin Flow
  3. 9:01Flow in app architecture
  4. 12:14State flow explained
  5. 14:46Flow binding for UI
  6. 17:40Testing Kotlin Flow
  7. 20:16Workshop setup
  8. 21:48Code walkthrough
  9. 31:48Adding dependencies
  10. 35:33Network call in repository
  11. 40:27Mutable state flow in ViewModel
  12. 43:56Collecting state flow in UI
  13. 47:21Testing success scenario
  14. 54:04Testing error scenario
  15. 1:04:19Q&A
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.