re: Explain Futures and Streams in Dart like I'm Five VIEW POST

re: TL/DR: Futures are like Promises. In fact, when Dart compiles into JavaScript, Futures are replaced with Promises. Streams are essentially a subs...

Great, thanks. Understood Futures from the promises example. I really didn't get streams until the last sentence.

Still trying to grasp how I'd use them based on your explanation. So do streams generally take futures as values? Or how exactly do they work?

Going by

whenever something of interest is available, it will be passed through the Stream.

Wouldn't a future just work equally as well? I may be a little confused here. I can see use cases for futures, but still confused on how or when I'd need a stream. Do you mind giving an example use-case in production?

Code of Conduct Report abuse