title: Detect if the user leaves the current page in Flutter?
body: <p>Is there any way to detect if the user leaves the current page?
  I don’t think <code>WidgetsBinding</code> will work, because it handles these events by itself.
  So, does anyone have any solution?
  Any help is appreciated.</p>