cached_network_image-0.4.2 is used with 0.0.2
DlerAhmad opened this issue · comments
I am using 0.0.2 but getting following compiler errors:
Seems like /Library/flutter/.pub-cache/hosted/pub.dartlang.org/simple_slider-0.0.2/pubspec.yaml shows cached_network_image: "^0.4.1" as dependency while it should be cached_network_image: ^1.1.2+1. why is not getting the latest pubspec.yaml file?? :
pubspec.yaml:
1 name: simple_slider
2 description: A Flutter slider widget
3 version: 0.0.2
4 author: Eddy WM eddywmdev@gmail.com
5 homepage: https://github.com/eddywm/simple_slider
6
7 environment:
8 sdk: ">=2.0.0-dev.68.0 <3.0.0"
9
10 dependencies:
11 flutter:
12 sdk: flutter
13 cached_network_image: "^0.4.1"
14 shared_preferences: ^0.4.2
15 cupertino_icons: ^0.1.2
Compiler message:
/Library/flutter/.pub-cache/hosted/pub.dartlang.org/cached_network_image-0.4.2/lib/cached_network_image.dart:460:24: Error: The method 'CachedNetworkImageProvider.load' has fewer positional arguments than those of overridden method 'ImageProvider.load'.
ImageStreamCompleter load(CachedNetworkImageProvider key) {
^
/Library/flutter/packages/flutter/lib/src/painting/image_provider.dart:574:24: Context: This is the overridden method ('load').
ImageStreamCompleter load(T key, DecoderCallback decode);
^
/Library/flutter/.pub-cache/hosted/pub.dartlang.org/cached_network_image-0.4.2/lib/cached_network_image.dart:199:38: Error: The argument type 'void Function(ImageInfo, bool)' can't be assigned to the parameter type 'ImageStreamListener'.
- 'ImageInfo' is from 'package:flutter/src/painting/image_stream.dart' ('/Library/flutter/packages/flutter/lib/src/painting/image_stream.dart').
- 'ImageStreamListener' is from 'package:flutter/src/painting/image_stream.dart' ('/Library/flutter/packages/flutter/lib/src/painting/image_stream.dart').
oldImageStream?.removeListener(_handleImageChanged);
^
/Library/flutter/.pub-cache/hosted/pub.dartlang.org/cached_network_image-0.4.2/lib/cached_network_image.dart:200:32: Error: The argument type 'void Function(ImageInfo, bool)' can't be assigned to the parameter type 'ImageStreamListener'. - 'ImageInfo' is from 'package:flutter/src/painting/image_stream.dart' ('/Library/flutter/packages/flutter/lib/src/painting/image_stream.dart').
- 'ImageStreamListener' is from 'package:flutter/src/painting/image_stream.dart' ('/Library/flutter/packages/flutter/lib/src/painting/image_stream.dart').
_imageStream.addListener(_handleImageChanged);
^
/Library/flutter/.pub-cache/hosted/pub.dartlang.org/cached_network_image-0.4.2/lib/cached_network_image.dart:210:34: Error: The argument type 'void Function(ImageInfo, bool)' can't be assigned to the parameter type 'ImageStreamListener'. - 'ImageInfo' is from 'package:flutter/src/painting/image_stream.dart' ('/Library/flutter/packages/flutter/lib/src/painting/image_stream.dart').
- 'ImageStreamListener' is from 'package:flutter/src/painting/image_stream.dart' ('/Library/flutter/packages/flutter/lib/src/painting/image_stream.dart').
_imageStream?.removeListener(_handleImageChanged);
^
/Library/flutter/.pub-cache/hosted/pub.dartlang.org/cached_network_image-0.4.2/lib/cached_network_image.dart:464: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' ('/Library/flutter/packages/flutter/lib/src/foundation/diagnostics.dart').
informationCollector: (StringBuffer information) {
having the same issue have any one found the solution