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

Update loading_strategies.md #240

Closed
wants to merge 2 commits into from

Conversation

miguelpruivo
Copy link

@miguelpruivo miguelpruivo commented Mar 3, 2020

As of 2.0.1 it seems that caching strategies aren't updated. #224 purposes a valid and updated solution, so example should have it as well.

Thank you @tsinis.

As of `2.0.1` it seems that `rootBundle` is no longer required as a parameter.
Updated example accordingly to 2d-inc#224.

Thank you @tsinis for coming up with the solution.
@tsinis
Copy link

tsinis commented Mar 6, 2020

Hi!

Good job @miguelpruivo, thank you for this PR. It would be even better if there will be info about caching multiple FLR files at once (in original Loading Strategies there was a list of Strings with paths to FLR files), because ATM asset provider can only cache single String as parameter. Obviously it's not enough sometimes if there is several animations to cache... Thanks anyways.

Best regards,
Roman

@a7medpa
Copy link

a7medpa commented May 31, 2020

I'm quite new to all of this so bear with me.

In part 2 it suggests that you should use that branch in the pubspec. I tried checking how to add a dependency from a branch and this is what I ended up within my pubspec under dependencies:
flare_flutter: git: url: git:https://github.com/2d-inc/Flare-Flutter/tree/4abf8947b16f2d45c02a34c48bd7b209fa208ce3 ref: sync_load
It seems that the above is incorrect because it just hangs.

Is it possible to provide an example of this in addition to the multiple files/assets that @tsinis suggested? I have done it but I'm sure it's not the best way of doing it. Thanks in advance.

@mwenechac-sys
Copy link

I am trying to load multiple files. Is there an example of how I can do that?

@umberto-sonnino
Copy link
Contributor

I am trying to load multiple files. Is there an example of how I can do that?

@mwenechac-sys there's a snippet here for warming up the cache from a List: add more to the list to load multiple before the app starts.

Bear in mind that initializing more assets before launch will slow down the app startup times, so before filling up that list, I'd recommend determining which assets truly need to be warmed-up in cache.

@luigi-rosso luigi-rosso deleted the branch 2d-inc:sync_load March 13, 2021 01:04
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

Successfully merging this pull request may close these issues.

None yet

6 participants