android - Flutter webview goback()不起作用
问题描述
当用户(Android)使用系统本身的后退按钮时,我想回到 webview 的上一页。我在 webview flutter by back button device 中找到了 goback 的教程,但是当我实现它并单击后退按钮时,会弹出此错误:
Exception has occurred.
NoSuchMethodError (NoSuchMethodError: The method 'goBack' was called on null.
Receiver: null
Tried calling: goBack())
知道如何解决吗?
解决方案
推荐阅读
- ruby - 如何在 github 操作中捆绑安装私有 gem
- git - git svn clone 非标准存储库有问题
- image-processing - 用 RGB 值模糊图像而不用内核卷积
- php - 无法在 Ubuntu 18.10 上安装 php7.2-ldap - “未满足的依赖项”
- node.js - 环境变量大小限制 beanstalk node.js
- android - 为什么 Leakcanary 声明弱引用导致了泄漏?
- java - 使用 for 循环读取带有 Apache POI 且没有标题的 Excel 表
- ruby-on-rails - 如何在活动管理员上使用操作文本
- javascript - Highcharts + R:自动以百万/十亿等显示工具提示值
- qt - 如何将 QtConcurrent::mappedReduced 与 lambdas 或 std::functions 的 lambdas 一起使用?