Flutter apps feel fast until they do not. A scroll stutters, a button tap waits half a second, an animation drops frames β and the cause is rarely the widget tree. More often, the app is doing heavy work on the same thread that draws the UI. Dart runs your code on a single thread, called the main isolate, and while that thread is busy parsing JSON or crunching numbers, it cannot build frames. The fix is to move the heavy work somewhere else: a second isolate.
An isolate is Dart's version of a thread, with one important difference: isolates do not share memory. Each one has its own heap and its own event loop, so they communicate only by sending messages. That sounds restrictive, but it is exactly what makes them safe. There are no data races, no locks, and no shared mutable state to corrupt.β¦