Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

用 Navigator.pushReplacement 跳转时,didPageExit()方法没有调用 #2

Open
lds8988 opened this issue Apr 24, 2020 · 3 comments

Comments

@lds8988
Copy link

lds8988 commented Apr 24, 2020

如题

@SBDavid
Copy link
Owner

SBDavid commented May 8, 2020

的确没有处理replacement,这个在下一版本加上

@XinleZhou2018
Copy link

@lds8988
A页面push到B页面,B页面push到C页面,然后C页面直接pop到A页面,按照目前您这个框架,B页面的didPageView()和didPageExit()都会调用,实际上按照产品的定义,从C页面直接pop到A页面,B页面的两个的didPageView()和didPageExit()是不需要埋点的,怎么解决这个问题?

C页面pop到A页面的方法如下:

          Navigator.of(context).popUntil((Route route){
              if (route.settings.name == "/"){
                return true;
              }

              return false;
          });

@lds8988
Copy link
Author

lds8988 commented Jun 20, 2020

@lds8988
A页面push到B页面,B页面push到C页面,然后C页面直接pop到A页面,按照目前您这个框架,B页面的didPageView()和didPageExit()都会调用,实际上按照产品的定义,从C页面直接pop到A页面,B页面的两个的didPageView()和didPageExit()是不需要埋点的,怎么解决这个问题?

C页面pop到A页面的方法如下:

          Navigator.of(context).popUntil((Route route){
              if (route.settings.name == "/"){
                return true;
              }

              return false;
          });

我不是开发者

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants