简体   繁体   English

如何在Flutter中将Webview嵌入另一个小部件中?

[英]How to embed webview inside another widget in Flutter?

I've tried to embed webview inside another widget in Flutter and I found some libraries. 我试图将webview嵌入Flutter中的另一个小部件中,但发现了一些库。

But all of libraries I found can only launch webview as a new activity. 但是我发现的所有库只能将webview作为一项新活动启动。

Having a WebView, MapView, video, camera, etc. inline in a Flutter widget tree is not currently supported. 当前不支持在Flutter小部件树中内联WebView,MapView,视频,照相机等。 To my understanding, they're working on this currently. 据我了解,他们目前正在对此进行研究。

See these GitHub pull requests: 请参阅以下GitHub拉取请求:

Edit #1: The PRs have landed, and there's a WIP plugin of embedding a native video control inside a Flutter widget tree. 编辑#1: PR已着陆,并且有一个WIP插件 ,可将本地视频控件嵌入Flutter小部件树中。 To my understanding, WebView / MapView etc. require dispatching the touch/gesture events to the native counterparts, and they're not ready yet. 据我了解,WebView / MapView等需要将touch / gesture事件调度到本地对象,而它们尚未准备好。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM