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

Preload pictures of next page #7

Open
jplauber opened this issue Dec 15, 2020 · 2 comments
Open

Preload pictures of next page #7

jplauber opened this issue Dec 15, 2020 · 2 comments

Comments

@jplauber
Copy link

First of all thanks for this great library. I want to show pictures on every page like an instagram story. As soon as I switch to the next page, it will be white for a bit until the picture is loaded. Is it possible to somehow preload the picture of the next page, so it will be visible as soon as I change the page?

This is how I am loading the picture right now;: Image.asset(dish.pictureUrl, fit: BoxFit.cover)

@diegoveloper
Copy link
Contributor

I think you can use the package called cached_network_image or precache the image before : https://stackoverflow.com/a/56265069/666221

@jplauber
Copy link
Author

Thanks for your fast answer, but it didn't worked for me. I've ended up using this lib, it worked pretty fine for me: https://pub.dev/packages/preload_page_view#-readme-tab-

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