【发布时间】:2020-08-02 22:24:42
【问题描述】:
我不是在问 webview。这是关于 Flutter Web 应用程序的。当用户按下浏览器内置的返回按钮时,我需要返回特定页面。
有什么猜测吗?
当我按下返回按钮时出现此错误
Error: Assertion failed: org-dartlang-
sdk:///flutter_web_sdk/lib/_engine/engine/history.dart:110:14
_userProvidedRouteName != null
is not true
at Object.throw_ [as throw] (http://localhost:8300/dart_sdk.js:4770:11)
at Object.assertFailed (http://localhost:8300/dart_sdk.js:4721:15)
【问题讨论】:
-
你试过
WillPopScope()吗? stackoverflow.com/questions/45916658/… -
我收到此错误
-
错误:断言失败:org-dartlang-sdk:///flutter_web_sdk/lib/_engine/engine/history.dart:110:14 userProvidedRouteName != null 在对象处不正确。在 Object.assertFailed (localhost:8300/dart_sdk.js:4721:15) 处抛出 [as throw] (localhost:8300/dart_sdk.js:4770:11)
-
请同时提供解决方案。如果它正在工作@FaslurRajah
标签: flutter web-applications flutter-web