title: When AppLifeCycleState.detached gets called?
body: <p>I've:</p>
  
  <pre><code>class _PageState extends State&lt;Page&gt; with WidgetsBindingObserver {
    @override
    void initState() {
      super.initState();
      WidgetsBinding.instance.addObserver(this);
    }
  
    @override
    void dispose() {
      WidgetsBinding.instance.removeObserver(this);
      super.dispose();
    }
  
    @override
    void didChangeAppLifecycleState(AppLifecycleState state) {
      super.didChangeAppLifecycleState(state);
      print('state = $state');
    }
  
    @override
    Widget build(BuildContext context) =&gt; Scaffold();
  }
  </code></pre>
  
  <p><code>AppLifeCycleState</code> class has got 4 callbacks, 3 of them </p>
  
  <pre><code>- active
  - paused
  - resumed
  </code></pre>
  
  <p>Seems to work but <code>detached</code> never worked in any case. </p>
  
  <p>I read the <a href="https://api.flutter.dev/flutter/dart-ui/AppLifecycleState-class.html" rel="nofollow noreferrer">documentation</a> but couldn't understand it in practical scenario, can anyone share a relevant code, when and where does it get called? </p>