Flows in Kotlin
Flow vs Stateflow vs Sharedflow
First, the Base Type: Flow<T>
A cold asynchronous stream.
Starts emitting only when collected.
Use for standard data streams (e.g., database queries, API paginated responses).
fun getNumbers(): Flow<Int> = flow {
...
bpn.hashnode.dev2 min read