Flutter与Android 原生WebView对比
然后用 WebView 打开淘宝首页: 用 flutter_webview_plugin 打开淘宝首页: 可以发明,用 WebView 打开淘宝首页内存根基无变革,可是用 flutter_webview_plugin 打开淘宝首页内存有明明的增进,且颠簸较大。 结论:flutter_webview_plugin 相对 native WebView 而言,占用内存较大。 HTML5 兼容性比拟 可以在 html5test 中对赏识器的兼容性举办评分,通过测试发明 native WebView 和 flutter_webview_plugin 的得划星散如下: 此刻小米8SE手机上,native WebView 和 flutter_webview_plugin 的 html5 兼容性得分都是 501。 结论:native WebView 和 flutter_webview_plugin 的 html5 兼容性无明明差别。 总结 我们对 native WebView 和 flutter_webview_plugin 别离举办了网页加载速率、占用内存和 html5 兼容性作了比拟,发明 native WebView 占用内存更小,网页加载速率和 html5 的兼容性无明明差别。 在现实行使中,因为 flutter_webview_plugin 并不存在于 widget 树中,以是不能在 flutter_webview_plugin 中行使如 snackbars, dialogs...这些关照交互 widget。可是 flutter_webview_plugin 具有跨平台的上风,假如必要同时 flutter 项目中同时在 Android 和 iOS 端行使 WebView,提议行使 flutter_webview_plugin,不然,提议行使 native WebView。 但愿各人踊跃接头,交换一下你们的名贵履历,相互进步下! (编辑:湖南网) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |