简体   繁体   中英

How to solve Swipe back not working on iOS

each time i use a plugin to move to the next page on iOS the swipe back will not work like

 Navigator.push(
                  context,
                  Transition(
                      child: Bio(),
                      transitionEffect: TransitionEffect.BOTTOM_TO_TOP),
                );

i have use like 5 plugin now swipe back is not working

but if i use this

 Navigator.pop(context);
                    Navigator.push(
                      context,
                      MaterialPageRoute(
                        builder: (ctx) => Actitvities(),
                      ),
                    );

the swipe back works.... but i want to use transition for the page route

in my case. i was using a plugin and the plugin is using

WillPopScope (
    onWillPop: () async {
     
    },

so i fork the plugin and remove the willpopscope. then i add the fork plugin like this to my pubspeck

  kittens:
    git:
      url: git://github.com/munificent/kittens.git
      ref: some-branch

full example here

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM