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

How to precache an image #19

Open
abdimussa87 opened this issue Jul 15, 2023 · 0 comments
Open

How to precache an image #19

abdimussa87 opened this issue Jul 15, 2023 · 0 comments

Comments

@abdimussa87
Copy link

Feature request for Cloudinary Flutter SDK

Precache a cloudinary image

Explain your use case

I wanted to be able to precache an image so that when the CldImageWidget is built, it'll already have the image loaded as it has been precached

Describe the problem you’re trying to solve

Have an image precached so that it'll be loaded before the CldImageWidget is built, leading to a more responsive feeling

Do you have a proposed solution?

I was thinking of using something like this (note precacheImage is flutter's builtin method, yet it requires an ImageProvider as it's argument):
precacheImage(NetworkImage(publicId), context);
Instead of NetworkImage, use a cloudinary image provider.

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

1 participant