错误信息:../../../../../Developer/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_advanced_networkimage-0.5.0......
../../../../../Developer/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_advanced_networkimage-0.5.0/lib/src/provide
r/flutter_advanced_networkimage.dart:143:24: Error: The method 'AdvancedNetworkImage.load' has fewer positional
arguments than those of overridden method 'ImageProvider.load'.
ImageStreamCompleter load(AdvancedNetworkImage key) {
^
../../../../../Developer/flutter/packages/flutter/lib/src/painting/image_provider.dart:403:24: Context: This is the
overridden method ('load').
ImageStreamCompleter load(T key, DecoderCallback decode);
^
Target kernel_snapshot failed: Exception: Errors during snapshot creation: null
Failed to build bundle.
解决办法:
将flutter_advanced_networkimage的版本号升级到 flutter_advanced_networkimage:^0.7.0
升级之后如果还不可以,看提示信息,可能是这个包会依赖其他的包,所以也要升级所依赖包的版本。
我的项目用到了decorated_flutter 包,所以也要升级decorated_flutter :^0.12.0+1