Skip to content

Support FlutterEngine in FlutterPluginRegistry #32894

Description

@chip2n

FlutterPluginRegistry cannot be used properly with FlutterEngine at the moment, since FlutterRegistrar.messenger() returns an uninitialized FlutterNativeView instead of FlutterEngine.dartExecutor. This makes it hard to use some flutter plugins in embedding scenarios (NPE when attempting to access BinaryMessenger).

https://github.com/flutter/engine/blob/865cb1c986cf5abf93023f9b0bcbafd36a68eca2/shell/platform/android/io/flutter/app/FlutterPluginRegistry.java#L55-L57

https://github.com/flutter/engine/blob/865cb1c986cf5abf93023f9b0bcbafd36a68eca2/shell/platform/android/io/flutter/app/FlutterPluginRegistry.java#L125

Seems like this issue is known since there's a TODO by @matthew-carroll in the code, but didn't find an issue associated with it so I'm creating this one. Has there been any progress on this?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions