Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ class CachedNetworkImageProvider
codec: _loadBufferAsync(key, chunkEvents, decode),
chunkEvents: chunkEvents.stream,
scale: key.scale,
debugLabel: key.url,
informationCollector: () => <DiagnosticsNode>[
DiagnosticsProperty<ImageProvider>('Image provider', this),
DiagnosticsProperty<CachedNetworkImageProvider>('Image key', key),
Expand Down Expand Up @@ -132,6 +133,7 @@ class CachedNetworkImageProvider
codec: _loadImageAsync(key, chunkEvents, decode),
chunkEvents: chunkEvents.stream,
scale: key.scale,
debugLabel: key.url,
informationCollector: () => <DiagnosticsNode>[
DiagnosticsProperty<ImageProvider>('Image provider', this),
DiagnosticsProperty<CachedNetworkImageProvider>('Image key', key),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,12 @@ class MultiImageStreamCompleter extends ImageStreamCompleter {
MultiImageStreamCompleter({
required Stream<ui.Codec> codec,
required double scale,
String? debugLabel,
Stream<ImageChunkEvent>? chunkEvents,
InformationCollector? informationCollector,
}) : _informationCollector = informationCollector,
_scale = scale {
this.debugLabel = debugLabel;
codec.listen(
(event) {
if (_timer != null) {
Expand Down Expand Up @@ -101,7 +103,13 @@ class MultiImageStreamCompleter extends ImageStreamCompleter {
_frameCallbackScheduled = false;
if (!hasListeners) return;
if (_isFirstFrame() || _hasFrameDurationPassed(timestamp)) {
_emitFrame(ImageInfo(image: _nextFrame!.image, scale: _scale));
_emitFrame(
ImageInfo(
image: _nextFrame!.image,
scale: _scale,
debugLabel: debugLabel,
),
);
_shownTimestamp = timestamp;
_frameDuration = _nextFrame!.duration;
_nextFrame = null;
Expand Down Expand Up @@ -151,7 +159,13 @@ class MultiImageStreamCompleter extends ImageStreamCompleter {

// This is not an animated image, just return it and don't schedule more
// frames.
_emitFrame(ImageInfo(image: _nextFrame!.image, scale: _scale));
_emitFrame(
ImageInfo(
image: _nextFrame!.image,
scale: _scale,
debugLabel: debugLabel,
),
);
return;
}
_scheduleAppFrame();
Expand Down