Xcode showing Flutter and Dart file errors in the project.
JustStanix opened this issue · 2 comments
So this is very strange, I can't seem to find what is wrong and I keep getting these errors. I'm getting the 3 following errors currently.
/Users/NAME/Downloads/.pub-cache/hosted/pub.dartlang.org/cached_network_image-0.7.0/lib/src/cached_network_image_provider.dart:42:24: Error: The method 'CachedNetworkImageProvider.load' has fewer positional arguments than those of overridden method 'ImageProvider.load'.
/Users/NAME/Downloads/development/flutter/packages/flutter/lib/src/painting/image_provider.dart:489:24: Context: This is the overridden method ('load').
/Users/NAME/Downloads/.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()'.
Do you have any idea why this is happening? I can't seem to find the issue since Xcode is not giving me anything else but this. I did flutter doctor
, everything seems fine, I ran flutter analyze
inside the project and no errors were shown only some warnings. I am using the latest version of Xcode which might be the problem, I am using Legacy Build Tools, everything is up to date. There were also some errors in the code which I managed to resolve but I have no idea what is going on with these 3. I hope you can help me resolve this issue.
Sincerely,
JustStanix
I found something more in the logs. These errors also appear when running flutter run
Compiler message:
../../../.pub-cache/hosted/pub.dartlang.org/cached_network_image-0.7.0/lib/src/cached_network_image_provider.dart:42:24: Error: The method 'CachedNetworkImageProvider.load' has fewer positional arguments than those of overridden method 'ImageProvider.load'.
ImageStreamCompleter load(CachedNetworkImageProvider key) {
^
../../../development/flutter/packages/flutter/lib/src/painting/image_provider.dart:489:24: Context: This is the overridden method ('load').
ImageStreamCompleter load(T key, DecoderCallback decode);
^
../../../.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' ('../../../development/flutter/packages/flutter/lib/src/foundation/diagnostics.dart').
informationCollector: (StringBuffer information) {
^
Target kernel_snapshot failed: Exception: Errors during snapshot creation: null
Failed to build bundle.
Failed to package /Users/NAME/Downloads/Projects/Instagram-Clone.
Me too