Async Programming in Flutter With Streams

A separate workflow for portions of your code

Pun intended | Photo by Hendrik Cornelissen on Unsplash

Asynchronous Programming is a principle that allows a portion of your programs run while waiting for some other activities to occur in your application thread. It allows portions of your code run independently from the main workflow.

A couple of examples of asynchronous processes are: fetching data from network, or looping over some very large chunk of data.

In flutter there are a series of ways to write asynchronous code. Some popular methods are:

Future.

Async/Await.

Streams.

The purpose of this article is to get you started using streams in your flutter apps, and I expect you to have prior knowledge about writing flutter apps, let’s get to it!