GetOptions class

Options of DocumentReference.get and Query.get: where the data comes from.

FlutterFire's GetOptions also has a serverTimestampBehavior; here it is an argument of DocumentSnapshot.data and DocumentSnapshot.get instead.

final DocumentSnapshot<Map<String, Object?>> cached = await firestore
    .doc('cities/SF')
    .get(const GetOptions(source: Source.cache));

Constructors

GetOptions({Source source = Source.serverAndCache})
Options that read from source, by default the server with a fallback to the cache.
const

Properties

hashCode → int
The hash code for this object.
no setteroverride
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
source → Source
Where to read from.
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.
override