QuerySnapshot class
A QuerySnapshot contains zero or more DocumentSnapshot objects representing the results of a query. The documents can be accessed as an array via the docs property or enumerated using the forEach() method. The number of documents can be determined via the empty and size properties.
See: firebase.google.com/docs/reference/js/firebase.firestore.QuerySnapshot.
Properties
-
docs
→ List<
DocumentSnapshot> -
Non-null list of all the documents.
no setter
- empty → bool
-
true
if there are no documents.no setter - hashCode → int
-
The hash code for this object.
no setterinherited
- jsObject → QuerySnapshotJsImpl
-
JS object.
finalinherited
- metadata → SnapshotMetadata
-
Non-null metadata about this snapshot, concerning its source and if it
has local modifications.
no setter
-
query
→ Query<
QueryJsImpl> -
The Query you called Query.get or Query.onSnapshot on to get the
QuerySnapshot.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- size → int
-
The number of documents.
no setter
Methods
-
docChanges(
) → List< DocumentChange> - Non-null list of the documents that changed since the last snapshot. If this is the first snapshot, all documents will be in the list as added changes.
-
forEach(
dynamic callback(DocumentSnapshot)) → void - Enumerates all of the documents in the QuerySnapshot.
-
isEqual(
QuerySnapshot other) → bool -
Returns
true
if this QuerySnapshot is equal to the provided one. -
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
Static Methods
-
getInstance(
QuerySnapshotJsImpl jsObject) → QuerySnapshot -
Creates a new QuerySnapshot from a
jsObject
.