wchaowu / flutter_sample

jd joybuy flutter sample
129 stars 63 forks source link

Issue with running the sample in android studio #1

Open ashrafsaqib opened 4 years ago

ashrafsaqib commented 4 years ago

I have updated android studio, I imported project directly from git into android studio and after getting dependencies and running project for first time I got the below error in the log.

/G:/flutter/.pub-cache/hosted/pub.dartlang.org/cached_network_image-0.5.1/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' ('/G:/flutter/packages/flutter/lib/src/painting/image_stream.dart').
 - 'ImageStreamListener' is from 'package:flutter/src/painting/image_stream.dart' ('/G:/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);
xiaoyubai commented 4 years ago

Update the cached_network_image package solved the issue.