Skip to content

State management

Laura Voetzsch edited this page Jun 7, 2025 · 5 revisions

Flow APIs Overview

  • A type that can emit multiple values sequentially
  • A terminal operator like collect is needed to trigger the flow to start listening for values
  • Observable data holder class
  • Only updates app component observers that are in an active lifecycle state
  • Observable data holder class
  • Configurable generalization of StateFlow
  • Converts a cold Flow into a hot StateFlow that is started in the given coroutine scope, sharing the most recently emitted value from a single running instance of the upstream flow with multiple downstream subscribers.
  • Converts a cold Flow into a hot SharedFlow that is started in the given coroutine scope, sharing emissions from a single running instance of the upstream flow with multiple downstream subscribers, and replaying a specified number of replay values to new subscribers.

Clone this wiki locally