flutter - 如何用beamer实现 "not found"页面

标签 flutter dart routes navigator flutter-navigation

我正在使用beamer flutter 包
我正在尝试实现“未找到页面”

假设用户在网络上并在网址上输入
http://localhost:64132/#/mdn%20vab%20ad,,,,had
我想将用户路由到未找到的页面
你能推荐一种使用投影仪来做到这一点的方法吗?

谢谢

最佳答案

最好使用 SimpleLocationBuilderBeamerLocationBuilder。这两个将自动检测 not-found,而完全自定义的 locationBuilder 则不会(在这种情况下,您将只返回自定义的 not-found BeamLocation(如果所有其他检查都失败)。

要定义 not-found 页面,您可以在 BeamerDelegate 中使用以下属性之一:

关于flutter - 如何用beamer实现 "not found"页面,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/68032277/

相关文章:

flutter - 如何在SfCartesianChart中制作自定义工具提示?

node.js - 如何在 Express 中的路由之间传递数据

Flutter 更改下拉箭头颜色

android - “Fluttertoast”已被弃用,不应使用。将在进一步版本中删除

ios - 多个设备之间的通信

c# - 如何接受数组作为 ASP.NET MVC Controller 操作参数?

ruby-on-rails - 命名空间路由和模型路径 rails

android - flutter 中的眨眼检测?

templates - 当 <template if ='...' > 最终实例化为 Dart Polymer 中的 DOM 时如何设置回调

dart - 混合列和行解决错误