kalismeras61 / flutter_page_transition

This is Flutter Page Transition Package
BSD 2-Clause "Simplified" License
475 stars 57 forks source link

Swipe to Navigate Back in iOS not working #19

Closed nihalreddy33 closed 4 years ago

nihalreddy33 commented 4 years ago

I am unable to swipe back when using the PageTransition. Is there any way to enable it?

kwent commented 4 years ago

Yes,

It's cause this library is completely overriding buildTransitions implemented by CupertinoPageRoute and so _CupertinoBackGestureDetector is not implemented at all.

I managed to modify the library internally with few changes to make it work left to right (since right to left is the default).

This is NOT RECOMMENDED for production use and might break at any time.. I opened a ticket here: https://github.com/flutter/flutter/issues/49266 to see if flutter can support this upstream.

Differences are: https://github.com/flutter/flutter/compare/master...kwent:cupertino_page_route_left_to_right.

Include https://gist.github.com/kwent/d2763bc2ca894bfbb2191350d006c6d8 in your project and call

import './CupertinoPageRoute.dart' as right
Navigator.push(
    context,
    right.CupertinoPageRoute(
        context: context,
        builder: (context) {
          return Center(child:Text('Hello world'));
        }));
kalismeras61 commented 4 years ago

This is Cupertino issue. Closing for now.