HarmonyOS webview_flutter报错

flutter使用webView_flutter这个库,版本是4.4.2,看报错内容是需要设置平台,应该如何设置?

报错如下:

'package:webview_flutter_platform_interface/src/platform_webview_controller.dart': Failed assertion: line 26 pos 7: 'WebViewPlatform.instance != null': A platform implementation for `webview_flutter` has not been set. Please ensure that an implementation of `WebViewPlatform` has been set to `WebViewPlatform.instance` before use. For unit testing, `WebViewPlatform.instance` can be set with your own test implementation.
HarmonyOS
1天前
浏览
收藏 0
回答 1
待解决
回答 1
按赞同
/
按时间
zbw_apple

webview_flutter依赖方式和版本号不对,4.4.2版本没有适配,请按如下方式修改:

webview_flutter:
  git:
    url: "https://gitee.com/openharmony-sig/flutter_packages.git"
  path: "packages/webview_flutter/webview_flutter"
分享
微博
QQ
微信
回复
1天前
相关问题
HarmonyOS webView_flutter保存
41浏览 • 1回复 待解决
HarmonyOS flutter webview如何调试
107浏览 • 1回复 待解决
HarmonyOS 编译flutter报错
39浏览 • 1回复 待解决
HarmonyOS Flutter run指令报错
36浏览 • 1回复 待解决
HarmonyOS 创建Flutter demo运行报错
42浏览 • 1回复 待解决
HarmonyOS flutter plugin引用时git报错
46浏览 • 1回复 待解决
flutter url_launcher在HarmonyOS报错
41浏览 • 1回复 待解决
HarmonyOS 使用flutter创建packages时报错
45浏览 • 1回复 待解决
HarmonyOS webview cookie同步报错
76浏览 • 1回复 待解决
Webview加载报错-net::ERR_NAME_NOT_RESOLVED
13797浏览 • 3回复 待解决
webview打开地址时报错 怎么回事啊?
6025浏览 • 1回复 待解决