flutter - 如何知道Flutter webview中的Google表单是否提交成功?

标签 flutter webview google-forms

假设我已将 google 表单集成到我的 flutter 应用程序中,并且我希望我的用户能够准确填写它,如果他们不这样做,那么我想限制我的应用程序的进一步功能。

最佳答案

所以我找到了一种在flutter webview中读取google表单成功完成消息的方法。

我们可以创建一个方法并使用Web View Controller 来读取页面的JavascriptInterface。始终发布成功提交消息的 div 称为“vHW8K”。所以我们可以检查这个div是否有一些值,如果有那么这意味着表单已成功提交

future checkFormFilledStatus() 异步 { return wait _webViewController.runJavascriptReturningResult("document.getElementsByClassName('vHW8K').length > 0") == "true"; }

Completion message display div This is how successful completion is displayed

关于flutter - 如何知道Flutter webview中的Google表单是否提交成功?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/73626219/

相关文章:

dart - Flutter 应用程序中图像显示和用户 react 的准确时间

android - 设置LightTouchEnabled(假);已弃用 - 替代方案?

java - 我的设备中的 Pdf 文件无法在 WebView 中加载

android - (Android)有没有办法检测何时在 WebView 中选择了文本?

google-apps-script - Google 表单是否允许 'On-the-Fly' 部分重复?

google-apps-script - Google 表单 - 自动填写多项选择调查

Flutter Messaging App - 禁用图标按钮

Flutter Web 应用程序无法在移动浏览器上运行。手机浏览器运行flutter代码报错怎么调试?

android - 应用级别的gradle文件中flutterversionNameflutterVersionCode的flutter问题

google-apps-script - Apps 脚本 - 以编程方式将答案从 Google Sheet 提交到 Google Form - 错误 - "Sorry, this response has already been submitted."