title: How to detect iOS back swipe gesture in Flutter MaterialApp?
body: <p>I want to detect when the user uses the back swipe gesture in my iOS App. How can I do it?</p>
  <p>I created CupertinoPageRoute hoping that it would somehow work with it...</p>
  <pre><code>    return MaterialApp(
          initialRoute: AllProductsScreen.id,
  
          onGenerateRoute: (RouteSettings settings) {
            switch (settings.name) {
              case AllProductsScreen.id:
                return CupertinoPageRoute(
                    builder: (_) =&gt; AllProductsScreen(), settings: settings);
              case ProductScreen.id:
                return CupertinoPageRoute(
                    builder: (_) =&gt; ProductScreen(), settings: settings);
              case FavoritesScreen.id:
                return CupertinoPageRoute(
                    builder: (_) =&gt; FavoritesScreen(), settings: settings);
              default:
                return CupertinoPageRoute(
                    builder: (_) =&gt; AllProductsScreen(), settings: settings);
            }
          },
        );
  </code></pre>