redux - 如何在 CupertinoApp 中导航

标签 redux dart flutter flutter-redux

使用 MaterialApp,您可以提供 navigatorKey 并在您的中间件中使用它来在必要时重定向用户(就像在 flutter redux 示例中所做的那样)。

但是 CupertinoApp 没有 navigatorKey

我们现在正在做的是将 context 添加到操作中,以便我们可以在中间件中访问它,然后可以使用 Navigator.of(context) , 但这似乎是非常错误的。

实现此目标的最佳方法是什么?

最佳答案

navigatorKey 已添加到 CupertinoApp

关于redux - 如何在 CupertinoApp 中导航,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52480785/

相关文章:

javascript - react : How can I render multiple menus with map() without causing a re-render?

javascript - Redux 工具包存储在下一个 js 中的页面之间导航时自动重置

dart - Flutter 共享插件不起作用

flutter - Flutter:更新ListView中的特定项目

flutter - 如何检查设备是模拟器还是物理设备?

javascript - 我应该在测试中使用 toHaveBeenCalledTimes 来计算调度被调用的次数吗?

node.js - Redux 用 Node.js 替换整个数据库?

flutter - Flutter:使用扩展

Flutter 单选按钮文本 "kg"对齐问题?

flutter - 如何使用条形码结果在Flutter中打开WebView