{"id":26504981,"url":"https://github.com/oxequa/flutter_cache_image","last_synced_at":"2025-03-20T20:56:09.853Z","repository":{"id":32858567,"uuid":"144498782","full_name":"oxequa/flutter_cache_image","owner":"oxequa","description":"Flutter plugin to load and cache network or firebase storage images with a retry mechanism if the download fails","archived":false,"fork":false,"pushed_at":"2022-05-21T00:04:02.000Z","size":113,"stargazers_count":33,"open_issues_count":10,"forks_count":25,"subscribers_count":3,"default_branch":"master","last_synced_at":"2023-08-20T21:30:19.791Z","etag":null,"topics":["firebase-storage","flutter","flutter-firebase","flutter-package","flutter-plugin"],"latest_commit_sha":null,"homepage":"","language":"Dart","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/oxequa.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-08-12T20:31:49.000Z","updated_at":"2023-03-12T09:35:06.000Z","dependencies_parsed_at":"2022-09-20T22:54:47.090Z","dependency_job_id":null,"html_url":"https://github.com/oxequa/flutter_cache_image","commit_stats":null,"previous_names":[],"tags_count":0,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oxequa%2Fflutter_cache_image","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oxequa%2Fflutter_cache_image/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oxequa%2Fflutter_cache_image/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oxequa%2Fflutter_cache_image/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/oxequa","download_url":"https://codeload.github.com/oxequa/flutter_cache_image/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244688933,"owners_count":20493906,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["firebase-storage","flutter","flutter-firebase","flutter-package","flutter-plugin"],"created_at":"2025-03-20T20:56:09.191Z","updated_at":"2025-03-20T20:56:09.844Z","avatar_url":"https://github.com/oxequa.png","language":"Dart","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# Flutter Cache Image\n\n[![pub package](https://img.shields.io/pub/v/cache_image.svg)](https://pub.dartlang.org/packages/cache_image)\n\nA Flutter plugin to load and cache network or firebase storage images with a retry mechanism if the download fails.\n \nThis package supports the download of images from a standard *network path* and from a *firebase storage gs path*. \n\nImages are stored in the temporary directory of the app.\n\n## Usage\n\nTo use this plugin, add firebase_storage as a dependency in your pubspec.yaml file.\n\n```\ndependencies:\n  cache_image: \"^1.0.5\"\n\n```\n\nImport cache_image in a dart file:\n```\nimport 'package:cache_image/cache_image.dart';\n```\n\nTo support firebase storage download the generated google-services.json file and place it inside android/app. Next, modify the android/build.gradle file and the android/app/build.gradle file to add the Google services plugin as described by the Firebase assistant. \n\n## How to use\n\nCache Image can be used with any widget that support an ImageProvider.\n\n``` dart\nImage(\n    fit: BoxFit.cover,\n    image: CacheImage('gs://your-project.appspot.com/image.png'),\n),\nImage(\n    fit: BoxFit.cover,\n    image:  CacheImage('https://hd.tudocdn.net/874944?w=646\u0026h=284', duration: Duration(seconds: 2), durationExpiration: Duration(seconds: 10)),\n),\nFadeInImage(\n    fit: BoxFit.cover,\n    placeholder: AssetImage('assets/placeholder.png'),\n    image: CacheImage('gs://your-project.appspot.com/image.jpg')\n)\n ```\n\nSee the `example` directory for a complete sample app using Cache Image.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foxequa%2Fflutter_cache_image","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foxequa%2Fflutter_cache_image","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foxequa%2Fflutter_cache_image/lists"}