Added contributors image caching mechanism #550
<span aria-hidden="true">✅</span> Deploy Preview for cv-mobile-app-web ready!
| Name | Link |
|:-:|------------------------|
|<span aria-hidden="true">🔨</span> Latest commit | 9c6931c0c7717814638c6aaadcedc3313c13e790 |
|<span aria-hidden="true">🔍</span> Latest deploy log | https://app.netlify.com/projects/cv-mobile-app-web/deploys/69c1616d3b046b000868ff8d |
|<span aria-hidden="true">😎</span> Deploy Preview | https://deploy-preview-550--cv-mobile-app-web.netlify.app |
|<span aria-hidden="true">📱</span> Preview on mobile | <details><summary> Toggle QR Code... </summary><br /><br />!QR Code<br /><br />_Use your smartphone camera to open QR code link._</details> |
---
<!-- cv-mobile-app-web Preview -->
_To edit notification comments on pull requests, go to your Netlify project configuration._
cached_network_image was added to pubspec.yaml, but pubspec.lock is not updated in this PR. Since this repo commits pubspec.lock, please run flutter pub get and commit the resulting lockfile changes to keep dependency resolution reproducible across CI/dev machines.
This avatar renders at ~50px but CachedNetworkImage will typically decode/cache the full-size GitHub avatar unless you constrain decode dimensions. Consider setting width/height on the image and using memCacheWidth/memCacheHeight (and/or disk cache sizing) based on the widget size/devicePixelRatio to reduce memory use and improve scroll performance when many contributors are shown.
Pull request overview
Adds disk/memory caching for contributor avatar images on the About page to avoid re-downloading on each visit and improve offline behavior.
Changes:
cached_network_image dependency.FadeInImage.memoryNetwork with CachedNetworkImage for contributor avatars (with placeholder/error UI).Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
| ---- | ----------- |
| pubspec.yaml | Adds cached_network_image to enable avatar caching. |
| lib/ui/views/about/components/contributor_avatar.dart | Switches avatar rendering to CachedNetworkImage with placeholder/error handling. |
---
💡 <a href="/CircuitVerse/mobile-app/new/master?filename=.github/instructions/*.instructions.md" class="Link--inTextBlock" target="_blank" rel="noopener noreferrer">Add Copilot custom instructions</a> for smarter, more guided reviews. <a href="https://docs.github.com/en/copilot/customizing-copilot/adding-repository-custom-instructions-for-github-copilot" class="Link--inTextBlock" target="_blank" rel="noopener noreferrer">Learn how to get started</a>.
Straightforward improvement. CachedNetworkImage gives persistent disk caching, which means avatars survive across sessions and load instantly on repeat visits. The placeholder and error widget are both correctly handled.
magic-peach
SantamRC
This PR adds contributors image caching mechanism in the about page using cached_network_image.
Presently in the about page, Images were downloaded fresh on every page visit and Contributors' avatars had to be fetched from GitHub's servers each time. Also Images wouldn't display if the network was unavailable.
This mechanism solves these issues