0Pricing
Android Academy · Lesson

Kotlin Flow Basics

Emit and collect streams of data.

What Is a Flow?

A Flow is an asynchronous stream that emits multiple values over time. Think of it as a suspendable sequence you can transform and collect.

Building a Flow

The flow { } builder lets you emit values, optionally suspending between them.

fun numbers(): Flow<Int> = flow {
    for (i in 1..3) {
        delay(100)
        emit(i)
    }
}

All lessons in this course

  1. Coroutine Basics and Scopes
  2. viewModelScope and Dispatchers
  3. Kotlin Flow Basics
  4. StateFlow and SharedFlow
← Back to Android Academy