|
Answer» The streams’ functionality is part of Dart and is inherited by Flutter. In Flutter, there are two kinds of streams: - Single Subscription Streams: These streams deliver events sequentially. They are considered as sequences CONTAINED within a larger whole. These streams are used when the order in which events are received matters, such as reading a file. There can be only one listener throughout the sequence, and WITHOUT a listener, the EVENT won't be triggered.
- Broadcast Streams: These streams deliver events to their subscribers. Upon subscribing to events, subscribers are immediately able to start listening to them. These are versatile streams that allow several listeners to listen simultaneously. FURTHERMORE, one can listen again even after canceling a previous subscription.
|