I am having trouble using this dependency, because every time I add this dependency I get this error for debug and release builds (only tested android):
Compiler message:
../../../AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/cached_network_image-1.1.2+1/lib/src/cached_network_image_provider.dart:53:24: Error: The method 'CachedNetworkImageProvider.load' has fewer positional arguments than those of overridden method 'ImageProvider.load'.
ImageStreamCompleter load(CachedNetworkImageProvider key) {
^
/C:/tools/flutter/packages/flutter/lib/src/painting/image_provider.dart:403:24: Context: This is the overridden method ('load').
ImageStreamCompleter load(T key, DecoderCallback decode);
^
../../../AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/cached_network_image-1.1.2+1/lib/src/scaled_file_image.dart:45:24: Error: The method 'ScaledFileImage.load' has fewer positional arguments than those of overridden method 'ImageProvider.load'.
ImageStreamCompleter load(ScaledFileImage key) {
^
/C:/tools/flutter/packages/flutter/lib/src/painting/image_provider.dart:403:24: Context: This is the overridden method ('load').
ImageStreamCompleter load(T key, DecoderCallback decode);
^
Compiler terminated unexpectedly.
Are you on master channel of flutter? If so you'll need to fork the package and update the cahed_network_image constraint to support version 2.0.0+.
I'll be publishing beta version of the player tomorrow, with newer cached_network_image.
Oh yes I am on master channel. That must be the problem I can simply change to stable channel.
Thank you for fixing this and your extremely quick reply
Okay now it works again without any problems. Thank you again. I am closing this issue :)
Let's leave this issue open until those breaking change makes to stable. This might help others looking out for the same issue.
The issue is due breaking change in Flutter, added with this PR Flutter #41415.
Removed cached_network_image dependency, which was causing the issue. Upgrade to Version 5.1.0 or later.
Thank you