Isolates in Flutter

Running parallel code in Flutter has never been easy since the introduction of Dart 2.19

Dhruvam Sharma
Flutter Community

--

Isolates with Material 3

I have always wondered what set of code to run in the background to make my app powerful and responsive but I don’t really know how. Some time back I got to know about isolates and I tried implementing it. And I should tell you, it was painful. But I recently discovered how easy it has become. So here it is.

You might have heard about isolates but never really understood. Or maybe you might have implemented isolates but the code has always been messy and tedious to write. In any case, this blog will guide you through the ups and downs of the Isolate history and the current and better implementation. You might want to use the latest method or you might want to use the old method after all, all up to your use case.

The basics

This is how Flutter Documentation defines Isolates

An isolated Dart execution context.

Did you understand anything? At least I did not. So let’s begin understanding Isolates and then we’ll write our own definition. So what all do we need for Isolates Recipe?

  1. What are Isolates?
  2. Why do we need them?
  3. What is Event Handling?

--

--

Dhruvam Sharma
Flutter Community

Google-certified Android Developer @Unikon. Android Geek. In love with Flutter. Blockchain Explorer. Dancer. 🕺 Reader. Coffee Addict. 😍