Streams
Explore how Dart streams facilitate asynchronous event handling within the BLoC architecture. Understand creating, listening to, and filtering streams, and how they enable communication between UI components and BLoCs for effective state management in Flutter apps.
We'll cover the following...
The BLoC architecture
The BLoC architecture is a highly effective and efficient design pattern. It uses Dart streams, which make it easy to test and follow. The way it works is first, the UI widgets send events to the BLoC. Then, the BLoC responds with streams that the UI widgets can listen to.
In this section, we’ll cover Dart streams and see how to send events between the UI component and the BLoCs. We’ll even build the default counter app using the BLoC pattern to learn how to use it on our own.
Streams: What are they?
Dart streams provide a way to handle asynchronous events as a stream, handling a sequence of events over time. Streams can be used to handle user ...