Flutter Background Service not Stopping when App is removed from Task Manager

843 Views Asked by At

After starting the background service and removing the app from the task manager.After again opening the app and trying to stop the service using the button. It does not work. Although It Shows the Service is Running. I have also tried using AppLifecycleState.detached still it does stops the service If I try to stop the service on AppLifecycleState.paused it works fine

case AppLifecycleState.detached:
    print('appLifeCycleState detached');
    FlutterBackgroundService().invoke("stopService");
    break;
0

There are 0 best solutions below