title: How to detect when app is minized in flutter
body: <p>Is there a way to detect when the app has been minimized? Simply using <code>WidgetsBindingObserver</code> with the <code>paused</code> event doesn't work as it's indistinguishable from when the user turns off the screen / phone locks. Note, I need this to work for both android and ios.</p>
  <p>A bit of context of what I'm doing. In the application, I'm running a timer. I want to stop this timer if the user minimizes the app (e.g. uses its phone for something else). If the user, however, turns off the screen/locks it, I want the timer to continue.</p>