Skip to content
New issue

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

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

Already on GitHub? # to your account

Set ImageRenderMethodForWeb.HttpGet, as a default imageRenderMethodForWeb for flutter 3.27.0 compatibility workaround #996

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

Conversation

rednikisfun
Copy link

Set ImageRenderMethodForWeb.HttpGet, as a default imageRenderMethodForWeb for flutter 3.27.0 compatibility workaround

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

Workaround

⤵️ What is the current behavior?

Currently on flutter version 3.27.0, usage of cached_network_image causes canvaskit.js:21 Uncaught (in promise) SecurityError: Failed to execute 'texImage2D' on 'WebGL2RenderingContext': The image element contains cross-origin data, and may not be loaded. errors

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

Setting the ImageRenderMethodForWeb.HttpGet, as a default imageRenderMethodForWeb prevents the errors from being thrown, and the app doesn't crash.

💥 Does this PR introduce a breaking change?

Yes, the default value is being changed, which can cause unexpected behavior on older flutter versions

🐛 Recommendations for testing

📝 Links to relevant issues/docs

https://github.com/Baseflow/flutter_cached_network_image/issues/995
https://github.com/flutter/flutter/issues/160127

🤔 Checklist before submitting

  • [yes] All projects build
  • [yes] Follows style guide lines (code style guide)
  • [no] Relevant documentation was updated
  • [yes] Rebased onto current develop

Set` as a default `imageRenderMethodForWeb` for flutter 3.27.0 compatibility workaround
@AndreiMisiukevich
Copy link

ImageRenderMethodForWeb.HttpGet has significant performance issues, especially with a list of images.
I believe the proper fix should be in the Flutter repo (where it was broken).

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

Successfully merging this pull request may close these issues.

3 participants