Source enum
An enumeration of firestore source types.
Constants
- cache → const Source
-
Causes Firestore to immediately return a value from the cache, ignoring the server completely (implying that the returned value may be stale with respect to the value on the server). If there is no data in the cache to satisfy the
get()
orgetDocuments()
call,DocumentReference.get()
will return an error andQuery.getDocuments()
will return an empty QuerySnapshotPlatform with no documents.const Source(2)
- server → const Source
-
Causes Firestore to avoid the cache, generating an error if the server cannot be reached. Note that the cache will still be updated if the server request succeeds. Also note that latency-compensation still takes effect, so any pending write operations will be visible in the returned data (merged into the server-provided data).
const Source(1)
- serverAndCache → const Source
-
Causes Firestore to try to retrieve an up-to-date (server-retrieved) snapshot, but fall back to returning cached data if the server can't be reached.
const Source(0)
-
values
→ const List<
Source> -
A constant List of the values in this enum, in order of their declaration.
const List<
Source>
Properties
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a non-existent method or property is accessed. [...]
inherited
-
toString(
) → String -
A string representation of this object. [...]
override
Operators
-
operator ==(
Object other) → bool -
The equality operator. [...]
inherited