Compiler message:
lib/widgets/image/cached_network_image.dart:197: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'
('file:///data/mobile/flutter/packages/flutter/lib/src/painting/image_stream.dart').
'ImageStreamListener' is from 'package:flutter/src/painting/image_stream.dart'
('file:///data/mobile/flutter/packages/flutter/lib/src/painting/image_stream.dart').
Try changing the type of the parameter, or casting the argument to 'ImageStreamListener'.
oldImageStream?.removeListener(_handleImageChanged);
^
lib/widgets/image/cached_network_image.dart:198: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'
('file:///data/mobile/flutter/packages/flutter/lib/src/painting/image_stream.dart').
'ImageStreamListener' is from 'package:flutter/src/painting/image_stream.dart'
('file:///data/mobile/flutter/packages/flutter/lib/src/painting/image_stream.dart').
Try changing the type of the parameter, or casting the argument to 'ImageStreamListener'.
_imageStream.addListener(_handleImageChanged);
^
lib/widgets/image/cached_network_image.dart:208: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'
('file:///data/mobile/flutter/packages/flutter/lib/src/painting/image_stream.dart').
'ImageStreamListener' is from 'package:flutter/src/painting/image_stream.dart'
('file:///data/mobile/flutter/packages/flutter/lib/src/painting/image_stream.dart').
Try changing the type of the parameter, or casting the argument to 'ImageStreamListener'.
_imageStream?.removeListener(_handleImageChanged);
^
lib/widgets/image/cached_network_image.dart:463: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:///data/mobile/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) {
项目启动报错
Compiler message: lib/widgets/image/cached_network_image.dart:197:38: Error: The argument type 'void Function(ImageInfo, bool)' can't be assigned to the parameter type 'ImageStreamListener'.