首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >flutter WebChromeClient等效项,使用openFileChooser和onShowFileChooser

flutter WebChromeClient等效项,使用openFileChooser和onShowFileChooser
EN

Stack Overflow用户
提问于 2020-01-31 20:38:59
回答 1查看 1K关注 0票数 0

我也在尝试覆盖IOS上的openFileChooser/onShowFileChooser(https://developer.android.com/reference/android/webkit/WebChromeClient#onShowFileChooser(android.webkit.WebView,%20android.webkit.ValueCallback%3Candroid.net.Uri%5B%5D%3E,%20android.webkit.WebChromeClient.FileChooserParams%29)/(equivalent ),在网页视图中使用flutter (我已经使用过flutter_webview_pluginwebview_flutter)。

有没有办法只使用flutter就能做到这一点呢?(如果没有,我将不得不为IOS和android找到一个解决方案)

EN

回答 1

Stack Overflow用户

发布于 2020-06-03 22:41:42

您可以使用my plugin flutter_inappwebview,它是一个Flutter插件,允许您添加内联WebViews或打开应用内浏览器窗口,它有许多事件、方法和选项来控制WebViews。

在Android上,它实现了openFileChooser/onShowFileChooser,所以你可以使用<input type="file"><input type="file" accept="image/*" capture> (参见How to enable the usage of camera for HTML inputs such as )。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/60004108

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档