多次导航后的颤动刷新第一页

发布于 2025-02-06 15:10:25 字数 263 浏览 1 评论 0原文

我的问题是如何在“扑朔迷离”中执行以下操作:

我有一个包含组列表的页面(a),然后我推向小组详细信息(b),并且从页面bi am am to to另一个屏幕上进行编辑详细信息(页C C )。我想实现的是,当我将弹出回到第A页时,它将包含带有特定组的更新详细信息的刷新列表。我该如何实现?

我尝试的是:

我知道,当我从页面上推到B页面并从B中弹出时,正在执行刷新(我可以在从A到B时用回调实现此功能)...但是,当这种方法在从a-> b-> c,然后弹出到A。

my question is how to perform the following action in flutter:

I have a page with lists of groups (Page A) then I am pushing to group detail (Page B) and from Page B I am pushing to another screen to edit detail (Page C). What I want to achieve is that when I will pop back to Page A it will contain refreshed list with updated detail of specific groups. How can I achieve this?

WHAT I TRIED:

I know that when I am pushing from page A to page B and popping back from B is performing refresh (I can achieve this with then callback when going from A to B) ... but this approach is not working when going from A->B->C and then popping to A.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

半城柳色半声笛 2025-02-13 15:10:25

您为什么不尝试使用“颤动路线观察者”,只需检查是否弹出返回页面A,然后获取更新的组列表。

有关更多信息,您可以检查此链接
路由观察者类

didpopnext() >方法您可以编写弹出此页面时将执行的代码

Why don't you try to use Flutter Route Observer, simply you can check if you pop back to page A then you fetch the updated list of groups.

For more info you can check this link
Route Observer Class

Inside the didPopNext() method you can write code that will get executed when you pop to this page

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文