flutter_cached_network_image
flutter_cached_network_image copied to clipboard
Replace custom MultiImageStreamCompleter with flutter/foundation/MultiFrameImageStreamCompleter
on 3.19,it will lead some ios crash
fix https://github.com/flutter/flutter/issues/148927
There is no need to use Stram, as it will only fire once.
when result is FileInfo, it means download success.
await for (final result in stream) {
if (result is DownloadProgress) {
chunkEvents.add(
ImageChunkEvent(
cumulativeBytesLoaded: result.downloaded,
expectedTotalBytes: result.totalSize,
),
);
}
if (result is FileInfo) {
final file = result.file;
final bytes = await file.readAsBytes();
final decoded = await decode(bytes);
yield decoded;
}
}
@lwj1994 Can you provide more info on this and rebase and fix issues?
Can you provide more info on this and rebase and fix issues?
@martijn00 hi. The basic information is as described above. I received feedback from online users about the app crashing. The app crashes after scrolling for a while in a dual-column image list. This branch has been live for a month now and has been stable with no crash until now.