Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds debugLabel for the image stream completer #984

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from

Conversation

AlexV525
Copy link

@AlexV525 AlexV525 commented Nov 3, 2024

✨ What kind of change does this PR introduce? (Bug fix, feature, docs update...)

This is a bug fix. Fixes #973

This also helps to display the info in the Flutter Inspector.

As a reference, this is how the MultiFrameImageStreamCompleter implements the debugLevel.
https://github.com/flutter/flutter/blob/574b7e765d86f3f70eac8817a2906ac3099c0bf9/packages/flutter/lib/src/painting/image_stream.dart#L967

⤵️ What is the current behavior?

======== Exception caught by painting library ======================================================
The following message was thrown while painting an image:
Image null has a display size of 794×529 but a decode size of 1956×1280, which uses an additional 10849KB (assuming a device pixel ratio of 2.625).

Consider resizing the asset ahead of time, supplying a cacheWidth parameter of 794, a cacheHeight parameter of 529, or using a ResizeImage.

🆕 What is the new behavior (if this is a feature change)?

======== Exception caught by painting library ======================================================
The following message was thrown while painting an image:
Image https://example.com/redact.jpeg has a display size of 794×529 but a decode size of 1956×1280, which uses an additional 10849KB (assuming a device pixel ratio of 2.625).

Consider resizing the asset ahead of time, supplying a cacheWidth parameter of 794, a cacheHeight parameter of 529, or using a ResizeImage.

💥 Does this PR introduce a breaking change?

No.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add the ability to set debugLabel
1 participant