{"id":15177519,"url":"https://github.com/justprodev/flutter_cached_image","last_synced_at":"2026-02-28T17:04:09.048Z","repository":{"id":254507450,"uuid":"846549222","full_name":"justprodev/flutter_cached_image","owner":"justprodev","description":"Convenient wrapper over flutter_cached_network_image with some additional features","archived":false,"fork":false,"pushed_at":"2024-11-13T04:31:01.000Z","size":874,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-07T22:02:27.606Z","etag":null,"topics":["cache","flutter","http","image"],"latest_commit_sha":null,"homepage":"","language":"Dart","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/justprodev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-08-23T12:52:43.000Z","updated_at":"2024-11-13T04:31:02.000Z","dependencies_parsed_at":"2024-08-23T23:20:10.077Z","dependency_job_id":"d7bda437-ac3f-434f-8a64-cc2203a4d6c2","html_url":"https://github.com/justprodev/flutter_cached_image","commit_stats":{"total_commits":12,"total_committers":2,"mean_commits":6.0,"dds":"0.33333333333333337","last_synced_commit":"bcf29fca7983b5156464e5fe21a12bd35226f300"},"previous_names":["justprodev/flutter_cached_image"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/justprodev/flutter_cached_image","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/justprodev%2Fflutter_cached_image","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/justprodev%2Fflutter_cached_image/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/justprodev%2Fflutter_cached_image/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/justprodev%2Fflutter_cached_image/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/justprodev","download_url":"https://codeload.github.com/justprodev/flutter_cached_image/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/justprodev%2Fflutter_cached_image/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29943686,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-28T13:49:17.081Z","status":"ssl_error","status_checked_at":"2026-02-28T13:48:50.396Z","response_time":90,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["cache","flutter","http","image"],"created_at":"2024-09-27T14:40:18.673Z","updated_at":"2026-02-28T17:04:09.018Z","avatar_url":"https://github.com/justprodev.png","language":"Dart","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Flutter Test in Pull Requests](https://github.com/justprodev/flutter_cached_image/actions/workflows/pull_request.yaml/badge.svg)](https://github.com/justprodev/flutter_cached_image/actions/workflows/pull_request.yaml)\n[![codecov](https://codecov.io/gh/justprodev/flutter_cached_image/graph/badge.svg?token=2QHJCEYEBU)](https://codecov.io/gh/justprodev/flutter_cached_image)\n\n# Motivation\n\n1. Preconfigure [CachedNetworkImage](https://pub.dev/packages/cached_network_image).\n2. Ability to using [memory limits](/lib/src/image_provider_with_limits.dart) for using in mobile for a cases when backend sends big images sometimes.\n\n[Online demo](https://justprodev.com/demo/cached_image/index.html)\n\n# Usage\n\nAdd to `pubspec.yaml`:\n\n```yaml\n  cached_image:\n    git:\n      url: https://github.com/justprodev/flutter_cached_image.git\n      tag: 3.4.2-rc.05 # control the version, please - check releases\n```\n\n```dart\nCachedImage.image(\n  'https://picsum.photos/seed/100/300/200',\n  width: 300,\n  height: 200,\n  fit: BoxFit.cover,\n  borderRadius: const BorderRadius.all(Radius.circular(24)),\n  // If some image size \u003e [limitBytes] then downscale\n  imageLimits: const ImageLimits(limitBytes: 1024 * 1024, targetWidthOrHeight: 1024),\n);\n```\n\nYou can also preconfigure the error and placeholder widgets.\n\n```dart\nconfigureCachedImage() {\n  CachedImage.setDefaultErrorWidget((context, url, error, [widgetParameters]) {\n    if (widgetParameters == null) {\n      return const SizedBox();\n    }\n\n    return ClipRRect(\n      clipBehavior: Clip.hardEdge,\n      borderRadius: widgetParameters.$1 ?? const BorderRadius.all(Radius.circular(4)),\n      child: ColoredBox(\n        color: Colors.white,\n        child: SizedBox(\n          width: widgetParameters.$2,\n          height: widgetParameters.$3,\n          child: Center(\n            child: Column(\n              mainAxisSize: MainAxisSize.min,\n              children: [\n                Text(\n                  '😢',\n                  style: Theme.of(context).textTheme.displayLarge,\n                  textAlign: TextAlign.center,\n                ),\n                Text(\n                  'Image not loaded',\n                  style: Theme.of(context).textTheme.bodySmall,\n                  textAlign: TextAlign.center,\n                ),\n              ],\n            ),\n          ),\n        ),\n      ),\n    );\n  });\n\n  CachedImage.setDefaultPlaceholder((context, url, widgetParameters) {\n    return defaultPlaceholder(context, url, widgetParameters).animate(onPlay: (c) =\u003e c.loop()).shimmer(\n      colors: [\n        Colors.white,\n        Colors.grey[300]!,\n        Colors.white,\n      ],\n      duration: const Duration(milliseconds: 1500),\n    );\n  });\n}\n```\n\nSee [example](/example/) for more details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjustprodev%2Fflutter_cached_image","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjustprodev%2Fflutter_cached_image","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjustprodev%2Fflutter_cached_image/lists"}