-
-
Notifications
You must be signed in to change notification settings - Fork 716
Description
🐛 Bug Report
iOS issue: app shows a pink imageview briefly when reopened from the background.
Expected behavior: Should show image properly, and if found error then show the error widget.
Reproduction steps : Put iOS app is in background for a while and after sometime you will get this issue.
Configuration :
return CachedNetworkImage(
height: height,
width: width,
fit: fit,
imageUrl: normalizedPath,
maxHeightDiskCache: 2000,
maxWidthDiskCache: 2000,
color: color,
placeholder: (context, url) => SizedBox(
height: 30,
width: 30,
child: LinearProgressIndicator(
color: Colors.grey.shade200,
backgroundColor: Colors.grey.shade100,
),
),
errorWidget: (context, url, error) {
return Image.asset(
placeHolder,
height: height,
width: width,
fit: fit ?? BoxFit.cover,
errorBuilder: (context, error, stackTrace) {
return const Icon(Icons.broken_image,
size: 40, color: Colors.grey);
},
);
},
fadeOutDuration: const Duration(seconds: 0),
fadeInDuration: const Duration(seconds: 0),
);
Usage
return CustomImageView(
imagePath: vendorModel.vendorImage,
height: 62.adaptSize,
width: 62.adaptSize,
radius: BorderRadius.circular(100.h),
alignment: Alignment.center,
);
Version: cached_network_image: 3.4.1
Platform:
- 📱 iOS