想捏并缩放到webview_flutter
(我知道flutter_webview_plugin可以做到这一点,但出于其他原因,我想坚持使用flutter_webview。)
Zoom support #34
Flutter: how to enable gestures in a web view?
Flutter webview plugin - enable pinch zoom
他们都提到
this.webView.getSettings().setBuiltInZoomControls(true);
this.webView.getSettings().setSupportZoom(true); to allow pinch/zoom.
原谅我的愚蠢,我找不到在哪里添加此代码段,请帮忙。
最佳答案
下载此存储库:https://github.com/FisherWL/plugins/tree/add-zoom(感谢FisherWL)
将包内的 webview_flutter 文件夹复制到您的项目根文件夹,
然后在pubspec.yaml上引用以下文件夹:
webview_flutter:
path: ./webview_flutter
关于flutter - 启用捏合和放大webview_flutter,在此处添加代码段[this.webView.getSettings()。setBuiltInZoomControls(true);],我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59619087/