ApiCachePolicy enum

Controls whether a request may use cached data.

Inheritance
Available extensions

Values

disabled → const ApiCachePolicy

Always use the network and never read or write cache.

cacheFirst → const ApiCachePolicy

Return a fresh cache entry first, then use the network on a miss.

networkFirst → const ApiCachePolicy

Try the network first and use a valid cache entry if the network fails.

cacheOnly → const ApiCachePolicy

Return cached data immediately, including stale data, when available.

refresh → const ApiCachePolicy

Always use the network but store successful eligible responses.

networkWithStaleFallback → const ApiCachePolicy

Try the network and allow stale cached data when the network fails.

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