website icon indicating copy to clipboard operation
website copied to clipboard

Add HTMLElementView page + sample

Open johnpryan opened this issue 4 years ago • 2 comments
trafficstars

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

johnpryan avatar Dec 08 '20 18:12 johnpryan

Add this information to this section: https://docs.flutter.dev/platform-integration/web/web-images#cross-origin-images

atsansone avatar Jun 03 '23 06:06 atsansone

A page about HtmlElementView should also explain how it can be used to embed normal websites inside Flutter, not only for images.

feinstein avatar Nov 14 '23 00:11 feinstein

Refreshed documentation for HtmlElementView has just landed in the main branch API docs:

  • https://main-api.flutter.dev/flutter/widgets/HtmlElementView-class.html

ditman avatar Mar 23 '24 02:03 ditman

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.

johnpryan avatar Mar 25 '24 15:03 johnpryan