Skip to content

Replace custom image loading with cached_network_image - #1717

Merged
kevmo314 merged 4 commits into
mainfrom
app/cached-network-image
Oct 26, 2026
Merged

kevmo314 merged 4 commits into
mainfrom
app/cached-network-image

Conversation

@kevmo314

@kevmo314 kevmo314 commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

Replace the custom network image loader and disk-only placeholder provider with CachedNetworkImageProvider throughout chat, emote input/autocomplete/picker, badges, avatars, and previews. Cached images display immediately while stale entries refresh through the library. Existing dimensions, fades, transparent placeholders, and chat emote text fallbacks are preserved; animated image bytes are not resized or re-encoded.

Replaces #1715. The dependency is installed from kevmo314/flutter_cached_network_image at commit 4c24ee00b4fe69144a37e2cd4067eb74eabf1348, pinned in both pubspec.yaml and pubspec.lock. That commit fixes an undisposed queued animation frame in published 4.0.5. The fix is submitted upstream as Baseflow/flutter_cached_network_image#1065, with five regression tests and all 56 upstream tests passing. Switch back to a hosted dependency once the fix is released.

Validation

  • flutter pub get: resolves the actual Git dependency from the pinned fork commit, with no local dependency overrides.
  • flutter test --no-pub: all 493 tests pass, including the image leak checker.
  • flutter analyze --no-pub: passes.
  • dart format --output=none --set-exit-if-changed .: passes.
  • Five integration tests verify rendered GIF/WebP animation loops in chat and the picker, animation after clearing Flutter's memory cache and reopening persisted disk-cache metadata offline, and the emote text fallback when loading fails. The image leak checker remains enabled.

The image tests use Flutter's real decoder and real temporary disk files with controlled HTTP responses. Android/iOS device smoke tests were not run locally; native builds are covered by PR CI.

History

The available non-shallow git history and GitHub issue search contain no earlier cached_network_image usage. The custom loader was introduced by #439 in May 2022, replacing flutter_image/NetworkImageWithRetry to address #403's network-failure, retry, caching, and placeholder requirements. Those records do not identify a prior format-support problem; GIF and animated WebP playback are explicitly tested here.

@kevmo314
kevmo314 temporarily deployed to android-internal October 26, 2026 03:29 — with GitHub Actions Inactive
@kevmo314
kevmo314 marked this pull request as ready for review October 26, 2026 03:29
@kevmo314
kevmo314 temporarily deployed to android-internal October 26, 2026 04:53 — with GitHub Actions Inactive
@kevmo314
kevmo314 merged commit eb012df into main Oct 26, 2026
10 checks passed
@kevmo314
kevmo314 deleted the app/cached-network-image branch October 26, 2026 05:05

This branch was previously deployed

2 inactive deployments
ios-testflight — 998d8d28 Deployed Oct 26, 2026 by kevmo314 via ios / ipa #1808
android-internal — 998d8d28 Deployed Oct 26, 2026 by kevmo314 via android / apkaab #1808
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

Successfully merging this pull request may close these issues.

1 participant