Flutter:升级用到的第三方库(Flutter 3.7.0)
一,查看当前项目webview_flutter的版本:
我们需要对webview_flutter这个第三方库升级
说明:
pubspec.yaml 声明依赖哪些包的配置文件,可以手动配置
pubspec.lock 统一保存实际安装的各个包的具体来源和版本号,不需要手动配置
pubspec.yaml
查看pubspec.lock中:
webview_flutter: dependency: "direct main" description: name: webview_flutter sha256: f79d17d76fd4880173cf006597c959fe6dd5a325d36f805de2cada6733994271 url: "https://pub.flutter-io.cn" source: hosted version: "3.0.2"
说明:刘宏缔的架构森林是一个专注架构的博客,
网站:https://blog.imgtouch.com
原文: https://blog.imgtouch.com/index.php/2023/06/04/flutter-sheng-ji-yong-dao-de-di-san-fang-ku-flutter-3-7/
对应的源码可以访问这里获取: https://github.com/liuhongdi/
或: https://gitee.com/liuhongdi
说明:作者:刘宏缔 邮箱: 371125307@qq.com
二,在pub.dev搜索最新版本:
网址:
https://pub.dev/
可以看到最新版本是4.0.2
三,升级
修改pubspec.yaml,如图:
点击pub get,下载新版本库
四,查看升级后的效果:
pubspec.lock中:
webview_flutter: dependency: "direct main" description: name: webview_flutter sha256: f7ec234830f86d0ef2bd664e8460b0038b8c1a83ff076035cad74ac70273753c url: "https://pub.flutter-io.cn" source: hosted version: "4.0.2"
五,查看Flutter的版本:
liuhongdi@liuhongdideMacBook-Pro ~ % flutter --version Flutter 3.7.0 • channel stable • https://github.com/flutter/flutter.git Framework • revision b06b8b2710 (6 days ago) • 2023-01-23 16:55:55 -0800 Engine • revision b24591ed32 Tools • Dart 2.19.0 • DevTools 2.20.1