Skip to content

Breaking changes to plugin with flutter 3.29+ #163

@srmncnk

Description

@srmncnk

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions