Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to implement swipe to previous page in Flutter?

Tags:

flutter

dart

Go back feature works only on the edge of the screen on iPhone. How can I swipe to previous page from anywhere on the screen?

like image 625
David Avatar asked Apr 18 '18 08:04

David


1 Answers

correct way is :

MaterialApp(
  .
  .
  .
  theme: ThemeData(
    pageTransitionsTheme: PageTransitionsTheme(
      builders: {
        TargetPlatform.android: CupertinoPageTransitionsBuilder(),
        TargetPlatform.iOS: CupertinoPageTransitionsBuilder(),
      }
    )
  ),
  .
  .
  .
);
like image 131
DJafari Avatar answered Oct 09 '22 09:10

DJafari