Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel master, v1.5.9-pre.105, on Mac OS X 10.14.4 18E226, locale nl-NL)
[✓] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
[✓] iOS toolchain - develop for iOS devices (Xcode 10.2.1)
[✓] Android Studio (version 3.4)
[✓] VS Code (version 1.33.1)
Compiler message:
file:///.pub-cache/hosted/pub.dartlang.org/cached_network_image-0.7.0/lib/src/cached_network_image_provider.dart:46:31: Error: The argument type 'Null Function(StringBuffer)' can't be assigned to the parameter type 'Iterable<DiagnosticsNode> Function()'.
- 'StringBuffer' is from 'dart:core'.
- 'Iterable' is from 'dart:core'.
- 'DiagnosticsNode' is from 'package:flutter/src/foundation/diagnostics.dart' ('file:///Flutter/flutter/packages/flutter/lib/src/foundation/diagnostics.dart').
Try changing the type of the parameter, or casting the argument to 'Iterable<DiagnosticsNode> Function()'.
informationCollector: (StringBuffer information) {
^
Compiler failed
Switch back to Flutter version 1.5.8 it's compiles again
As a temporary workaround, you can navigate in Android Studio to Dart Packages > cached_network_image-0.7.0 > src > cached_network_image_provider.dart and remove the informationCollector named parameter (line 46), so the load(CachedNetworkImageProvider key) method will be as follows:
@override
ImageStreamCompleter load(CachedNetworkImageProvider key) {
return new MultiFrameImageStreamCompleter(
codec: _loadAsync(key),
scale: key.scale,
);
}
This may not the best solution, but if you want to stay in Flutter 1.5.9, this workaround will allow you to run your app.
I am also facing this issue .How it can be resolve as soon as possible
This can be easily resolved by using the stable version of Flutter which is 1.2.1
It is not recommended to use master branch as it is very unstable and plugins can not support it as it changes daily.
Unfortunately I use features in the master branch and I hope this conflict gets fixed soon
Issue solved
On Fri, 3 May, 2019, 1:45 AM aytunc, notifications@github.com wrote:
Unfortunately I use features in the master branch and I hope this conflict
gets fixed soon—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/renefloor/flutter_cached_network_image/issues/171#issuecomment-488815922,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ADH7S3MDF76BLGVL3RFDDOTPTNDUTANCNFSM4HJ22VNA
.
@Sh1d0w there are many reasons to use an unstable version. Tell people to downgrade won't help in any of these scenarios.
@Zazo032 thanks for the fix. It worked for me.
@ricardobrg When building production apps, you should always use stable stuff. Plugin maintainers can not keep up and provide support for both stable and unstable channels as sometimes changes are incompatible and the frequency of code changes in most unstable channels are daily. The purpose of those channels are so the developers can see what's upcoming, test and report, but not for building your entire app on unstable stuff.
EDIT: It is not something I made up, even developers at google does not recommend it https://github.com/flutter/flutter/issues/31962#issuecomment-488947722
@Sh1d0w I will not drag this discussion further because it won't help anyone. As I have mentioned, there are many reasons to use an unstable channel, even testing it to check plugins compatibility, and telling people to downgrade is not the kind of thing that will help in any of these.
Just to let you know, there is a recomendation from Flutter developers for using master branch in production in a specific scenario https://github.com/flutter/flutter/issues/29007#issuecomment-487475926 .
@ricardobrg I agree, this is not the place for this discussion, so I won't respond anymore. The comment you've linked says "try on master" to see if it was resolved, not "use master for production".
You are missing my point - most of the plugins are open source and maintainers can't work full time to keep up with different release channels other than stable. First because there are no point of doing this, as the comment below that one I've sent you again from google dev, that most of the stuff gets rolled back and forth, second because it's against any semantic versioning to support unstable stuff.
Issue solved
…
@prasant10050 is there a new version with the issue solved? Which cached network image version should I use to make it work again? Thanks
Issue solved
…@prasant10050 is there a new version with the issue solved? Which cached network image version should I use to make it work again? Thanks
PS. The issue is not resolved. It looks like @prasant10050 is referring that the proposed workaround / downgrading thats fixes the issue.
I made a temporary fix by disabling the informationCollector to keep it compatible with stable version of flutter. However pub publish gives an Internal Server Error at the moment, so I cannot publish that version. Probably something to do with the fact that they changed the url to pub.dev today.
Edit: although I got a 500 it is still published as 0.8.0 so you can all keep using the master channel if you want :)
@renefloor why we disable the informationCollector to keep it running without error is there any alternate way to resolve that problem?
@Zazo032 There is any alternate way to solve this problem for 64bit device (arm64). In flutter version 1.7.4 or later I got this problem..
Compiler message:
file:///home/zunroof-dev-4/package_flutter/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_image-1.0.0/lib/network.dart:75:31: Error: The argument type 'Null Function(StringBuffer)' can't be assigned to the parameter type 'Iterable<DiagnosticsNode> Function()'.
- 'StringBuffer' is from 'dart:core'.
- 'Iterable' is from 'dart:core'.
- 'DiagnosticsNode' is from 'package:flutter/src/foundation/diagnostics.dart' ('file:///home/zunroof-dev-4/package_flutter/flutter/packages/flutter/lib/src/foundation/diagnostics.dart').
Try changing the type of the parameter, or casting the argument to 'Iterable<DiagnosticsNode> Function()'.
informationCollector: (StringBuffer information) {
^
file:///home/zunroof-dev-4/package_flutter/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_image-1.0.0/lib/network.dart:168:65: Error: The argument type 'String' can't be assigned to the parameter type 'DiagnosticsNode'.
- 'DiagnosticsNode' is from 'package:flutter/src/foundation/diagnostics.dart' ('file:///home/zunroof-dev-4/package_flutter/flutter/packages/flutter/lib/src/foundation/diagnostics.dart').
Try changing the type of the parameter, or casting the argument to 'DiagnosticsNode'.
context: '$runtimeType failed to load ${instructions.uri}',
^
Compiler terminated unexpectedly.
Here is my flutter doctor -v:
flutter doctor -v
[✓] Flutter (Channel unknown, v1.7.4, on Linux, locale en_IN)
• Flutter version 1.7.4 at /home/zunroof-dev-4/package_flutter/flutter
• Framework revision dfecafa4ab (10 days ago), 2019-06-14 09:46:23 -0700
• Engine revision 2589785b5c
• Dart version 2.4.0
[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.0)
• Android SDK at /home/zunroof-dev-4/Android/Sdk
• Android NDK location not configured (optional; useful for native profiling support)
• Platform android-29, build-tools 29.0.0
• Java binary at: /home/zunroof-dev-4/android-studio/jre/bin/java
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1343-b16-5323222)
• All Android licenses accepted.
[✓] Android Studio (version 3.4)
• Android Studio at /home/zunroof-dev-4/android-studio
• Flutter plugin version 36.1.1
• Dart plugin version 183.6270
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1343-b16-5323222)
[✓] VS Code (version 1.35.1)
• VS Code at /usr/share/code
• Flutter extension version 3.1.0
[✓] Connected device (1 available)
• SM J700F • 3300d5864ee1a293 • android-arm • Android 6.0.1 (API 23)
• No issues found!
Compiler message:
file:///Users/xyz/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_image-1.0.0/lib/network.dart:75:31: Error: The argument type 'Null Function(StringBuffer)' can't be assigned to the parameter type 'Iterable
on stable channel version
Flutter 1.7.8+hotfix.3
Thanks
Appears to be fixed in version 1.1.0 working with the latest 1.7 release of Flutter.
Compiler message:
file:///Users/xyz/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_image-1.0.0/lib/network.dart:75:31: Error: The argument type 'Null Function(StringBuffer)' can't be assigned to the parameter type 'Iterable Function()'.
- 'StringBuffer' is from 'dart:core'.
- 'Iterable' is from 'dart:core'.
- 'DiagnosticsNode' is from 'package:flutter/src/foundation/diagnostics.dart' ('file:///Users/xyz/flutter/packages/flutter/lib/src/foundation/diagnostics.dart').
Try changing the type of the parameter, or casting the argument to 'Iterable Function()'.
informationCollector: (StringBuffer information) {on stable channel version
Flutter 1.7.8+hotfix.3Thanks
I added flutter_image: ^2.0.0in .yaml
Most helpful comment
As a temporary workaround, you can navigate in Android Studio to
Dart Packages > cached_network_image-0.7.0 > src > cached_network_image_provider.dartand remove theinformationCollectornamed parameter (line 46), so theload(CachedNetworkImageProvider key)method will be as follows:This may not the best solution, but if you want to stay in Flutter 1.5.9, this workaround will allow you to run your app.