I want to run a method in my main.dart file from the android(Kotlin) part of my app. For this I am using methodChannels and it works perfectly fine when the app is in foreground. However, the moment the app is killed, the flutterView is destroyed and therefore I am unable to run any methods in my main.dart file.
I read that using FlutterNativeView would allow me to do what I want but I am unable to find small code snippets to help me with it.
It would be great if you could help me with this
Thanks!!