在flutter中刷新StatefulShellRoute

Yas*_*ham 6 router flutter gorouter flutter-go-router

这是一个场景,我用来StatefulShellRoute保留应用程序中每个选项卡的状态,当用户登录或更改应用程序的语言时,我需要刷新StatefulShellRoute以加载新数据。

我尝试给UniqueKey每个应用程序一个StatefulShellBranch,但是当我热重载或使用检查器时,它会重建整个应用程序,这对性能和开发流程不利。

那么有什么干净的方法来刷新我的吗StatefulShellRoute