May 2023
Intermediate to advanced
712 pages
13h 42m
English
In Dart and Flutter, futures and streams are the main tools to deal with asynchronous programming.
While Future represents a single value that will be delivered at a later time in the future, Stream is a set (sequence) of values (0 or more) that can be delivered asynchronously, at any time. Basically, it is a flow of continuous data.
In order to get data from a stream, you subscribe (or listen) to it. Each time some data is emitted, you can receive and manipulate it as required by the logic of your app.
By default, each stream allows only a single subscription, but you will also see how to enable multiple subscriptions.
This chapter focuses on several use cases of streams in a Flutter app. You will ...
Read now
Unlock full access