android-studio - 方法 'CachedNetworkImageProvider.load' 的位置参数少于覆盖方法 'ImageProvider.load' 的位置参数

标签 android-studio flutter flutter-dependencies

enter image description here

请帮我解决 flutter 中的这个错误,我无法理解错误是什么以及如何解决它。请简单地告诉我解决方案意味着在哪里添加代码行和更改哪个文件,提前谢谢

最佳答案

Flutter 1.12.13+hotfix.5 • channel stable • https://github.com/flutter/flutter.git
Framework • revision 27321ebbad (12 days ago) • 2019-12-10 18:15:01 -0800
Engine • revision 2994f7e1e6
Tools • Dart 2.7.0


我今天将 Flutter 更新到最新版本,并收到此错误并阅读了 repo readme并采取行动。感谢包所有者 Rene Floor 现在一切正常

只需在 pubspec.yaml 中增加包按照楼主的建议:

cached_network_image: ^2.0.0-rc

由包所有者:

Breaking change with ImageProvider.load in Flutter 1.10

The Flutter team made a breaking change with the ImageProvider in Flutter 1.10.15 (currently Master channel only).

If you are experiencing one of the following errors upgrade to 2.0.0-rc.

The method 'ScaledFileImage.load' has fewer positional arguments than those of overridden method 'ImageProvider.load'

The method 'CachedNetworkImageProvider.load' has fewer positional arguments than those of overridden method

关于android-studio - 方法 'CachedNetworkImageProvider.load' 的位置参数少于覆盖方法 'ImageProvider.load' 的位置参数,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59337903/

相关文章:

Android Studio AVD Manager 无法更新系统镜像

Flutter 构建 Web 分段故障 - 无法启动事件处理程序线程

bash - 用于创建 git hooks 的 Flutter husky 包

android - Android Studio 中的 Kotlin 构建错误 << intent.putExtra ("string", it.getString ("string") >>

android - 更新后 android studio 无法为锁定文件创建父目录

flutter - 如何在 Flutter 中将 Hero 动画添加到我的 ListView 中?

layout - flutter 中从右到左(RTL)

dart - 如何在 flutter fluro 中传递多个参数

java - 从倒计时获取变量并将其设置到 TextView

firebase - Flutter - 可以在没有 firebase 的情况下使用 Google 登录吗?