title: How to close notification when app got killed in Flutter
body: <p>We are facing one issue while developing our flutter app.</p>
  
  <p>Scenario : We are using media notification to show/hide notification giving click action on it. </p>
  
  <p>Issue: When we are closing app forcefully(killing or swipe out from recent apps)the notification is still visible. I tried using <a href="https://api.flutter.dev/flutter/widgets/WidgetsBindingObserver-class.html" rel="nofollow noreferrer">WidgetsBindingObserver</a>.</p>
  
  <pre><code> AppLifecycleState _notification;
  
   @override
   void didChangeAppLifecycleState(AppLifecycleState state) {
       setState(() { 
           _notification = state;  // detect state inactive/ pause or resume state
       });
   }
  </code></pre>
  
  <p>Using this we can detect <strong>background, active, inactive states</strong> but when killing the app no method get called. We need some thing like <code>onDestroy</code> method which is called when you kill any app in native android. How can we handle this scenario in flutter. Please Help.</p>