Discussion on: Explain Futures and Streams in Dart like I'm Five

allanjeremy profile image
Allan N Jeremy Author

I had read the docs but was still unsure about the concepts. Your analogies have shed some light on the topic. Especially on streams.

The difference is that Futures are about one-shot request/response (I ask, there is a delay, I get a notification that my Future is ready to collect, and I'm done!) whereas Streams are a continuous series of responses to a single request (I ask, there is a delay, then I keep getting responses until the stream dries up or I decide to close it and walk away).

This answers the questions I've asked in my previous two replies above. So, thanks. Knowing this I can now explore creating streams as tests since it somewhat makes sense now.