Baseflow / Baseflow/flutter_cached_network_image

Images inside listview reloads when top page pops

Open
#529 12 comments 17 reactions 0 assignees View on GitHub
Dominant language
Dart
Stars
2.6k
Forks
731
Avg merge
3d 9h
Merged PRs (30d)
1

Description

## 🔙 Regression

Images inside a listview of screen-1 reload(displaying placeholder and showing image) when screen-2 pops from the navigation stack.

Screen 1 is the main page that shows when the app opens.
The user navigates to screen 2 by clicking on a button
and comes back to screen 1 by clicking the back button.
At that time the images show blurhash and then show the actual image.

PS: I'm using this package along with OctoImage package.

### Old (and correct) behavior
Image Should be displayed as it's already loaded.
### Current behavior
Image shows placeholder and reloads image like it did on the first load.
### Reproduction steps
Using a CachedNetworkImage widget on screen 1 and open screen2 and remove screen2 from the view.
```
OctoImage(
image: CachedNetworkImageProvider(Url),
placeholderBuilder: OctoPlaceholder.blurHash(
'LJH1#:Nz#MMgxdIV-nRrIaxVr_XA',
),
errorBuilder: OctoError.blurHash('LJH1#:Nz#MMgxdIV-nRrIaxVr_XA',
icon: Icons.warning_amber_rounded),
fit: BoxFit.cover,
height: double.infinity,
width: double.infinity,
);
```
### Configuration

**Version:** 2.5.0

**Platform:**
- [X] :iphone: iOS
- [X] :robot: Android

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing the issue with CachedNetworkImage and CachedNetworkImageProvider in the screen-1/screen-2 navigation flow, using the supplied OctoImage configuration. Check whether returning from screen 2 causes the cached image widget to rebuild or reload. Done means images on screen 1 remain displayed without showing the blurhash placeholder after screen 2 is popped, on both iOS and Android.

Written by the indexing model from the issue text.

Assessment

Tech stack
dart, flutter
Domain
mobile
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.