Add the ability to set debugLabel for ImageInfo's produced by MultiImageStreamCompleter.
Pitch
In Flutter, you can set debugInvertOversizedImages which, if set to true, triggers a throw of a FlutterException which has a following text:
Image $debugImageLabel has a display size of $outputWidthĂ—$outputHeight but a decode size of ${image.width}Ă—${image.height}, which uses an additional ${overheadInKilobytes}KB (assuming a device pixel ratio of $maxDevicePixelRatio).
As you can see, it uses debugImageLabel as image indicator for debug. This debugImageLabel is a debugLabel from ImageInfo class. But when MultiImageStreamCompleter from this library emits new ImageInfo object, it completely ignores debugLabel argument, which always results in it being equal to null, which, in case of multiple simultaneously resizing images, makes it impossible to detect the problematic image.
Q: Why would you need debug label if image is inverted by "debugInvertOversizedImages" flag?
A: Because during the rapid resizing animations, there might be the case when exception is thrown in the middle of the animation, but at the end, everything returns to normal and image is not inverted anymore.
In order to implement this, MultiImageStreamCompleter must receive debugLabel (or debugLabelCallback with some info passed to it) from above (the origin being CachedNetworkImage and CachedNetworkImageProvider) and pass it to all _emitFrame calls inside of it.
🏗 Enhancement Proposal
Add the ability to set
debugLabel
forImageInfo
's produced byMultiImageStreamCompleter
.Pitch
In Flutter, you can set
debugInvertOversizedImages
which, if set totrue
, triggers a throw of aFlutterException
which has a following text:As you can see, it uses
debugImageLabel
as image indicator for debug. ThisdebugImageLabel
is adebugLabel
fromImageInfo
class. But whenMultiImageStreamCompleter
from this library emits newImageInfo
object, it completely ignoresdebugLabel
argument, which always results in it being equal tonull
, which, in case of multiple simultaneously resizing images, makes it impossible to detect the problematic image.In order to implement this,
MultiImageStreamCompleter
must receivedebugLabel
(ordebugLabelCallback
with some info passed to it) from above (the origin beingCachedNetworkImage
andCachedNetworkImageProvider
) and pass it to all_emitFrame
calls inside of it.Platforms affected (mark all that apply)