I have a plugin which has both native and dart code. Currently there is an initialize
method in the dart code which needs to be called and creates a method channel (android).
A background engine is being created in my app and I want the plugin to automatically initialize without needing to call this initialize
method (because I don’t have access to this background engine code since it is created automatically by FirebaseMessaging.
Is there a way to do this? Maybe by executing the plugins dart code from onAttachedToEngine
in the java code?