我也在尝试覆盖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_plugin和webview_flutter)。
有没有办法只使用flutter就能做到这一点呢?(如果没有,我将不得不为IOS和android找到一个解决方案)
发布于 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 )。
https://stackoverflow.com/questions/60004108
复制相似问题