memechat icon indicating copy to clipboard operation
memechat copied to clipboard

in Main File addListener((_, __) can't be assigned to the parameter type 'ImageStreamListener'

Open rjzg85 opened this issue 5 years ago • 1 comments

There is an error in main.dart file in line 80, can't be assigned to the parameter type 'ImageStreamListener', I am using the latest version of Flutter and Dart.

would be nice if you can help me with the error, I tried to look answer on intenert and I couldnt find anything, I am new on this :(

Thanks in advance

rjzg85 avatar Jun 26 '19 00:06 rjzg85

I got the following error message:

Error: The argument type 'Null Function(dynamic, dynamic)' can't be assigned to the parameter type 'ImageStreamListener'.

Because of this:

      image
          .resolve(createLocalImageConfiguration(context))
          .addListener((_, __) {
        animationController?.forward();
      });

fixed with:

      image
          .resolve(createLocalImageConfiguration(context))
          .addListener(
          ImageStreamListener((ImageInfo image, bool synchronousCall) {
        animationController?.forward();
      }));

Hope that helps!

skoocda avatar Oct 11 '19 06:10 skoocda