Skip to content

Commit

Permalink
Improved debug console messages
Browse files Browse the repository at this point in the history
  • Loading branch information
hgraceb committed Jul 27, 2024
1 parent 1df55ab commit b481695
Showing 1 changed file with 8 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -78,13 +78,10 @@ class CachedNetworkImageProvider
codec: _loadBufferAsync(key, chunkEvents, decode),
chunkEvents: chunkEvents.stream,
scale: key.scale,
informationCollector: () sync* {
yield DiagnosticsProperty<ImageProvider>(
'Image provider: $this \n Image key: $key',
this,
style: DiagnosticsTreeStyle.errorProperty,
);
},
informationCollector: () => <DiagnosticsNode>[
DiagnosticsProperty<ImageProvider>('Image provider', this),
DiagnosticsProperty<CachedNetworkImageProvider>('Image key', key),
],
);

if (errorListener != null) {
Expand Down Expand Up @@ -132,13 +129,10 @@ class CachedNetworkImageProvider
codec: _loadImageAsync(key, chunkEvents, decode),
chunkEvents: chunkEvents.stream,
scale: key.scale,
informationCollector: () sync* {
yield DiagnosticsProperty<ImageProvider>(
'Image provider: $this \n Image key: $key',
this,
style: DiagnosticsTreeStyle.errorProperty,
);
},
informationCollector: () => <DiagnosticsNode>[
DiagnosticsProperty<ImageProvider>('Image provider', this),
DiagnosticsProperty<CachedNetworkImageProvider>('Image key', key),
],
);

if (errorListener != null) {
Expand Down

0 comments on commit b481695

Please sign in to comment.