WIP: Added FlareAnimationProvider to load from different sources #48
WIP: Added FlareAnimationProvider to load from different sources #48PeterZainzinger wants to merge 7 commits into2d-inc:masterfrom
Conversation
|
This is awesome, very excited to try it out. Thanks for your contribution! The out of band assets is an option for how to pack the images into the exported file. Images can be packed in band (directly in the .flr file) or out of band (provided along side it in the same folder). Right now none of the examples use out of band images we don't expose the option when exporting from Flare, but it something we plan on exposing soon as there are some cases where sharing images across multiple Flare files might be desirable. I'll try to review some of your caching questions a little later today or tomorrow, in the meantime we'll add this PR to our roadmap so we can make sure it stays on our radar this week. Thanks again! |
|
this looks nice !!! being able to load animation from network is really interesting ! from what I've seen I miss a was to manage errors, lot of things can go wrong when playing with network requests, would be nice to have the ability to provide a fallback in case of errors for example (or a callback with the errors) |
you are right error handling is MUST then if we can provide ByteData to flare actor |
Before it was only possible to load animations from assets, with this BREAKING change inspired by ImageProvider animations can be loaded from any source.
FlareActor(FlareCachedNetworkAnimationProvider(url: 'https://..'),...);Open Questions
readOutOfBandAssetdo and when is it used, it does not seem to be used in any examples, to test it we need an example animation which uses this feature.FlareCachedNetworkAnimationProviderwhich introduces a dependency toflutter_cache_managerbe a part of theflare_flutterpackage?