Mapping & Combining Flows
Transform streams before they hit the screen.
Shape Data Before the UI
Raw data rarely matches what the screen needs. You use flow operators to transform a stream into ready-to-render UI state.
Transform with map
The map operator runs a function on each emission and passes the result downstream, leaving the original stream untouched.
val names = users.map { it.name }All lessons in this course
- StateFlow vs SharedFlow
- Mapping & Combining Flows
- stateIn & WhileSubscribed
- One-Off Events with Channels