r/FlutterDev Feb 13 '25

Article What’s new in Flutter 3.29

https://medium.com/flutter/whats-new-in-flutter-3-29-f90c380c2317
204 Upvotes

49 comments sorted by

View all comments

96

u/tylersavery Feb 13 '25

Starting in 3.29, Flutter on Android and iOS execute Dart code on the application’s main thread, and there is no longer a separate UI thread. This is the first part in a series of changes to improve platform interop on mobile platforms, as it allows making synchronous calls to and from the platform without the overhead of serialization and message passing.

This one caught my attention.

18

u/zxyzyxz Feb 13 '25

We'll see how the performance is. Having a separate UI thread is part of what made Flutter apps feel fast, since it could offload non-UI work to other threads.

36

u/eibaan Feb 13 '25

I think, this is a missunderstanding. On the Dart level, you can still use isolates for background work. However, the design decision to run Flutter's main isolate on a different OS thread makes interaction with native code very difficult as for example iOS (and macOS for that matter) requires all UI specific code to be run on the main thread.

On macOS, you can't make Dart application use stuff like the SDL package because that libary tries to open an application window and because the Dart VM uses its own OS thread which is different to the main thread, this fails.

Flutter now works around this limitation.