website
website copied to clipboard
Add HTMLElementView page + sample
One of the solutions for resolving CORS issues with images is to use an HTMLElementView. We currently don't have any sample code for using it.
https://api.flutter.dev/flutter/widgets/HtmlElementView-class.html
this issue + comment has a sample that uses an ImageElement to display an image with the Google Books API to work around CORS issues with the CanvasKit renderer
Add this information to this section: https://docs.flutter.dev/platform-integration/web/web-images#cross-origin-images
A page about HtmlElementView should also explain how it can be used to embed normal websites inside Flutter, not only for images.
Refreshed documentation for HtmlElementView has just landed in the main branch API docs:
- https://main-api.flutter.dev/flutter/widgets/HtmlElementView-class.html
Now that we have docs for HtmlElementView I think we can close this. It doesn't seem to be the best solution for fixing CORS issues for Flutter apps.