QuerySnapshot class Null safety

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.


docs List<DocumentSnapshot>
Non-null list of all the documents.
empty bool
true if there are no documents.
hashCode int
The hash code for this object. [...]
read-only, inherited
jsObject → QuerySnapshotJsImpl
JS object.
final, inherited
metadata SnapshotMetadata
Non-null metadata about this snapshot, concerning its source and if it has local modifications.
query Query<QueryJsImpl>
The Query you called Query.get or Query.onSnapshot on to get the QuerySnapshot.
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
size int
The number of documents.


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 non-existent method or property is accessed. [...]
toString() String
A string representation of this object. [...]


operator ==(Object other) bool
The equality operator. [...]

Static Methods

getInstance(QuerySnapshotJsImpl jsObject) QuerySnapshot
Creates a new QuerySnapshot from a jsObject.