Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
rjzg85 opened this issue Jun 26, 2019 · 1 comment

Comments

@rjzg85
Copy link

rjzg85 commented Jun 26, 2019

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

@skoocda
Copy link

skoocda commented Oct 11, 2019

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants