ImageRenderMethodForWeb enum
Currently there are 2 different ways to show an image on the web with both their own pros and cons, using a custom HttpGet or an HTML Image element mentioned here on a GitHub issue.
When using HttpGet the image will work on Skia and it will use the OptimizedCacheImageProvider.headers when they are provided. In this package it also uses any url transformations that might be executed by the OptimizedCacheImageProvider.cacheManager. However, this method does require a CORS handshake and will not just work for every image from the web.
The HtmlImage does not need a CORS handshake, but it also does not use your provided headers and it does not work when using Skia to render the page.
Constructors
- ImageRenderMethodForWeb()
-
const
Values
- HtmlImage → const ImageRenderMethodForWeb
-
HtmlImage uses a default web image including default browser caching. This is the recommended and default choice.
- HttpGet → const ImageRenderMethodForWeb
-
HttpGet uses an http client to fetch an image. It enables the use of headers, but loses some default web functionality.
Properties
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Constants
-
values
→ const List<
ImageRenderMethodForWeb> - A constant List of the values in this enum, in order of their declaration.