CachePolicy enum
Values
- cacheOnly → const CachePolicy
-
Only return cached data. Do not hit network. Throw if missing.
- networkOnly → const CachePolicy
-
Only hit network. Ignore cache. Do not fallback.
- cacheFirst → const CachePolicy
-
Return cache if present and valid; otherwise fetch from network.
- networkFirst → const CachePolicy
-
Try network first; if it fails, return cache if available.
- cacheThenNetwork → const CachePolicy
-
Immediately provide cached data via onCached, then fetch network and update cache.
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<
CachePolicy> - A constant List of the values in this enum, in order of their declaration.