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

Latest version 1.7.0 not compiling using Flutter stable channel #187

Closed
gabrielginter opened this issue Nov 7, 2019 · 2 comments
Closed

Comments

@gabrielginter
Copy link

gabrielginter commented Nov 7, 2019

When using latest version of flare_flutter 1.7.0 user will get the following error if they use the Flutter stable channel when compiling.

Compiler message:
/C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/flare_flutter-1.7.0/lib/flare.dart:1109:11: Error: No named parameter with the name 'cacheWidth'.
          cacheWidth: cacheWidth, cacheHeight: cacheHeight);
          ^^^^^^^^^^
/C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/flare_flutter-1.7.0/lib/flare.dart:1106:33: Error: Too many positional arguments: 1 allowed, but 2 found.
Try removing the extra positional arguments.
    var load = networkImage.load(val, (Uint8List bytes,
                                ^
Compiler failed on ......

Line 1108 in file /lib/flare.dart tries to call method PaintingBinding.instance.instantiateImageCodec with parameters "cacheWidth" and "cacheHeight", such parameters in PaintingBinding haven't been added yet to the stable flutter release.

The following commit to Flutter has the changes I just mentioned: Commit d28651d

Perhaps this was intentional, but it will catch many users by surprise. If we are supposed to use a different flutter channel with version 1.7.0, perhaps would be good to add this to the change log in flutter.dev

Cheers

@luigi-rosso
Copy link
Contributor

luigi-rosso commented Nov 7, 2019

Thanks for the note, we just published 1.7.1 to fix this issue!

If you need changeImageFromNetwork, here's an example implemented as an extension method: https://gist.github.com/luigi-rosso/c50277341bd2681be072a575acbeb1fc#file-dynamic_image_swapping-dart-L100

This was implemented for issue #183

@gabrielginter
Copy link
Author

wow that was fast!! thanks!!

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