flutter_cached_network_image icon indicating copy to clipboard operation
flutter_cached_network_image copied to clipboard

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

Open rednikisfun opened this issue 1 year ago • 1 comments

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

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

Workaround

:arrow_heading_down: 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

:new: 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.

:boom: Does this PR introduce a breaking change?

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

:bug: Recommendations for testing

:memo: Links to relevant issues/docs

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

:thinking: 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

rednikisfun avatar Dec 12 '24 08:12 rednikisfun

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).

AndreiMisiukevich avatar Dec 16 '24 17:12 AndreiMisiukevich