Skip to content

Commit

Permalink
fix: disable pending image cache (#483)
Browse files Browse the repository at this point in the history
  • Loading branch information
kevmo314 authored Jun 3, 2022
1 parent 1a1aa13 commit e198133
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions lib/components/image/resilient_network_image.dart
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,10 @@ class ResilientNetworkImage extends ImageProvider<ResilientNetworkImage> {
final chunkEvents = StreamController<ImageChunkEvent>();
return MultiFrameImageStreamCompleter(
chunkEvents: chunkEvents.stream,
codec: _pending[hash] ??= _loadAsync(key, chunkEvents, decode),
codec: _pending[hash] ??= _loadAsync(key, chunkEvents, decode).then((x) {
_pending.remove(hash);
return x;
}),
scale: scale,
debugLabel: key.uri.toString(),
informationCollector: _imageStreamInformationCollector(key),
Expand All @@ -51,7 +54,7 @@ class ResilientNetworkImage extends ImageProvider<ResilientNetworkImage> {
assert(() {
collector = () => <DiagnosticsNode>[
DiagnosticsProperty<ImageProvider>('Image provider', this),
DiagnosticsProperty<NetworkImage>('Image key', key as NetworkImage),
DiagnosticsProperty<ResilientNetworkImage>('Image key', key),
];
return true;
}());
Expand Down

0 comments on commit e198133

Please sign in to comment.