I have a flutter added into my android host project. I am currently having multiple flutter engines. But there is no sharing of code between these engines. Therefore method-channel calls are happening multiple times. I have a single entry point for all the engines. I tried using singleton in my flutter code, but that is also executed multiple times. What would be a good solution to this. I read 'IsolateGroup' can be used but I haven't implemented it yet so I don't have a reference.
I found 2 solutions on this :