-
Notifications
You must be signed in to change notification settings - Fork 82
Description
Flutter introduced merging of ui and platform threads with version 3.29.
This means that Dart code is executed in the same thread as the platform channel (Java/Kotlin/Swift/ObjC code).
But implicitly this is true for all instances of FlutterEngine. For this plugin, which utilizes another FlutterEngine to spawn an Isolate capable of communicating with plugins / having callbacks from plugins, this means that the core functionality is broken - spawning a new FlutterIsolate will make it run in the same thread as the main Isolate.
Possibly related to #162, not related to #160.
More details of this are being discussed here and in the upper issue. Currently the workaround is to opt-in to two flags - DisableMergedPlatformUIThread (and possibly EnablePlatformIsolates?). This will restore the previous state and FlutterEngine will continue to work as before - but these flags are bound to be deprecated at some point, at which this plugin will break and not have a workaround anymore.