FetchPriority enum

Priority hints for browser resource scheduling via the fetchpriority attribute.

Informs the browser network layer of the relative importance of an image resource. Setting FetchPriority.high on hero images informs preloaders and HTTP/2 or HTTP/3 stream schedulers to prioritize image byte transmission over non-critical scripts or stylesheets.

Setting priority: true on bloomImage automatically configures FetchPriority.high alongside ImageLoading.eager.

bloomImage(
  src: '/assets/hero.webp',
  alt: 'Hero visual',
  fetchPriority: FetchPriority.high,
);

See also:

  • bloomImage, responsive image helper with built-in LCP optimizations.
  • ImageLoading, controlling when network fetching begins.
Inheritance
Available extensions

Values

high → const FetchPriority

Fetches the image with high priority relative to other network resources (recommended for LCP hero images).

const FetchPriority('high')
low → const FetchPriority

Fetches the image with low priority relative to other network resources (suitable for non-critical thumbnails).

const FetchPriority('low')
auto → const FetchPriority

Automatically resolves fetching priority according to standard browser heuristics.

const FetchPriority('auto')

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
value String
The raw HTML attribute string value ("high", "low", or "auto").
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
override

Operators

operator ==(Object other) bool
The equality operator.
inherited

Constants

values → const List<FetchPriority>
A constant List of the values in this enum, in order of their declaration.