2d-inc / Flare-Flutter

Load and get full control of your Rive files in a Flutter project using this library.
https://rive.app/
MIT License
2.55k stars 469 forks source link

[1.6.2] Animation partially not loaded #179

Closed TheFe91 closed 4 years ago

TheFe91 commented 4 years ago

I've forked and edited a nice animation https://www.2dimensions.com/a/TheFe91/files/flare/rosso-loader

Unfortunately when I call this animation in my app it shows like this: https://i.stack.imgur.com/OYnba.jpg

I use it in this way: FlareActor( 'assets/RossoLoader.flr', fit: BoxFit.fitWidth, alignment: Alignment.center, animation: 'Loading', ),

Any idea? Thanks!

umberto-sonnino commented 4 years ago

We're currently working on a fix, thanks for the report!

luigi-rosso commented 4 years ago

Please give this a try in the latest flare_flutter: ^1.7.0 and let us know if it fixes the issue for you!

TheFe91 commented 4 years ago

Unfortunately I'm no more able to build. This is the error the compilers give me (iOS and Android):

Compiler message: /Library/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); ^^^^^^^^^^ /Library/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,

luigi-rosso commented 4 years ago

Which Flutter channel are you using?

TheFe91 commented 4 years ago

the stable one

sotoyjuan commented 4 years ago

I'm getting the same exact error as @TheFe91 . Running latest stable version too.

luigi-rosso commented 4 years ago

Looks like there's a breaking change between stable and dev/master. The dev and master channels have a slightly different signature for the instantiateImageCodec call. Please try flare_flutter: ^1.7.1

Apologies for the hassle!

TheFe91 commented 4 years ago

Wonderful! Now It's working perfectly! Thanks for all the work! If it's OK for you, I'll close the issue

luigi-rosso commented 4 years ago

Great, no problem, and thank you for reporting and testing!