Streams

Learn how to create and work with Dart streams and why streams are important in the BLoC architecture.

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.

Press + to interact
UI-BLoC interaction: The BLoC streams and tracks state while the UI widgets emit events
UI-BLoC interaction: The BLoC streams and tracks state while the UI widgets emit events

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 ...

Access this course and 1400+ top-rated courses and projects.