-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Description
As we've been adopting in-package platform channels in more 1P plugins, which requires Dart plugin registration, we've hit an edge case related to isolates. While plugins don't generally work out of the box in isolates, there are workarounds which, IIUC, run the native plugin registration code in a separate engine instance so that the native side is there. These systems don't know about the new Dart plugin registration though, so half of the registration code is missing, and we end up with mismatches like #98473.
@gaaclarke @blasten (since you've both looked at the engine/VM integration part of the Dart plugin registration) is there a way we can automatically run the generated Dart registration in each new isolate, rather than just the primary isolate? Alternately, could we adjust the generated registration such that it provides a referenceable function that things like flutter_isolate could call during their isolate setup (similar to the need to call WidgetsFlutterBinding.ensureInitialized())?