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

利用 fish_redux 的 PageRoutes 使用 popUntil 返回到指定的页面无法使用 #477

Open
sanshilei168 opened this issue Sep 19, 2019 · 3 comments

Comments

@sanshilei168
Copy link

No description provided.

@zjuwjf
Copy link
Contributor

zjuwjf commented Sep 19, 2019

有具体代码么?

@sanshilei168
Copy link
Author

有具体代码么?

利用 pageRoutes 路由 进行页面的跳转 从 A —> B —> C —> D —> E 然后想要从 E处理过数据后直接返回到B 利用Navigator.popUntil(context, ModalRoute.withName('/B'));

@owoeo
Copy link

owoeo commented Nov 25, 2019

onGenerateRoute return MaterialPageRoute的时候,加上settings参数
例如

onGenerateRoute: (RouteSettings settings) {
      return MaterialPageRoute<Object>(
          builder: (BuildContext context) {
            return routes.buildPage(settings.name, settings.arguments);
          },
          settings: settings);
    }
Navigator.of(ctx.context)
          .popUntil((route) => route.settings?.name == '/B');

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