
Hi! I am trying to cache an image I am pulling from Appwrite Storage using cached_network_image
package in Flutter. The CachedNetworkImage lives inside a FutureBuilder and it's firing everytime. I've also attached the code. I've also tried to use the AsyncMemorizer in the dart:async
package but no progress. Any fixes?

This might be helpful: https://github.com/appwrite/appwrite/discussions/3474#discussioncomment-3109355

Thanks. WIll have a look an revert back in a while!

@Steven I am afraid it is not a correct solution.

I used getFileView and it is still making requests.

The suggestion in the discussion did not say to call that function

Then?

I can see the discussion says you need to call getFileView instead of getFileDownload

To clarify, I need to cache the image and download the Future only once. In this case, the FutureBuilder is firing everytime.

It says to use the url and pass it into network image widget

Solved. The solution was to just remove FutureBuilder and follow the rest of discussion you provided. Thanks for the help @Steven !

[SOLVED] Caching an image in FutureBuilder
Recommended threads
- Constant 404 Pages
Whenever I am navigating through items and pages to go through my collections and database I end up at a page that sends me a 404 error, if i refresh it remains...
- Flutter Google Auth (Access blocked: Thi...
It is working fine on web platform, but on Flutter I'm getting this error. Any option to fix, or this issue with AppWrite and need to use different option? Ac...
- Relationships restricted to a max depth ...
When I do query like: ``` await _databases.listDocuments( databaseId: AppwriteConfig.DATABASE_ID, collectionId: AppwriteConfig.SERVICES_COLLECTI...
