WebHtmlElementStrategy enum

The strategy for Image.network and NetworkImage to decide whether to display images in HTML elements contained in a platform view instead of fetching bytes.

See Image.network for more explanation on the impact.

This option is only effective on the Web platform. Other platforms always display network images by fetching bytes.

Inheritance
Available extensions

Values

never → const WebHtmlElementStrategy

Only show images by fetching bytes, and report errors if the fetch encounters errors.

fallback → const WebHtmlElementStrategy

Prefer fetching bytes to display images, and fall back to HTML elements when fetching bytes is not available.

This strategy uses HTML elements only if headers is empty and the fetch encounters errors. Errors may still be reported if neither approach works.

prefer → const WebHtmlElementStrategy

Prefer HTML elements to display images, and fall back to fetching bytes when HTML elements do not work.

This strategy fetches bytes only if headers is not empty, since HTML elements do not support headers. Errors may still be reported if neither approach works.

Properties

hashCode int
The hash code for this object.
no setterinherited
index int
A numeric identifier for the enumerated value.
no setterinherited
name String

Available on Enum, provided by the EnumName extension

The name of the enum value.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

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<WebHtmlElementStrategy>
A constant List of the values in this enum, in order of their declaration.