2

I have an Android plugin in my Flutter project used to access the backend.

In my MainActivity.kt, I have :

override fun configureFlutterEngine(flutterEngine: FlutterEngine) {
    GeneratedPluginRegistrant.registerWith(flutterEngine)
    flutterEngine.getPlugins().add(BackendChannelPlugin())
}

This works great, but when trying to use my plugin from an isolate spawned by workmanager, the plugin isn't registered (I get a Missing implementation error). How can I register my plugin in the Flutter Engine used by workmanager ? Every solution I've found on the internet has to do with the old PluginRegistrant callback implementation, which is now deprecated.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.