Stage 1 · Lesson 9 of 10
Streams
A Future delivers one value. A delivers a series of values over time: updates, messages in a chat, or changes to a database query. You read one with await for inside an async function, or with listen, which returns a StreamSubscription.
Learn the two kinds. A single-subscription stream allows one listener. A broadcast stream allows many.
You can transform streams with map and where, just like lists. shows a stream on screen with StreamBuilder.
Common trapcalling listen and never cancelling the subscription, which keeps the work running and leaks memory after the screen closes.
A question to check yourself, an AI practice session and 1 cheat sheet entry come with the full roadmap. Unlock
Resources for this stage
Start with
- GuideFreeDart Language Tour
Google · Beginner
The official tour: read it in order and rerun every example in DartPad