CollectionReference<T extends Object?> class abstract

Implemented types
Annotations

Constructors

CollectionReference()

Properties

firestore FirebaseFirestore
The FirebaseFirestore instance of this query.
no setterinherited
hashCode int
The hash code for this object.
no setterinherited
id String
Returns the ID of the referenced collection.
no setter
parameters Map<String, dynamic>
Exposes the parameters on the query delegate.
no setterinherited
parent DocumentReference<Map<String, dynamic>>?
Returns the parent DocumentReference of this collection or null.
no setter
path String
A string containing the slash-separated path to this CollectionReference (relative to the root of the database).
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

add(T data) Future<DocumentReference<T>>
Returns a DocumentReference with an auto-generated ID, after populating it with provided data.
doc([String? path]) DocumentReference<T>
Returns a DocumentReference with the provided path.
endAt(List<Object?> values) Query<T>
Takes a list of values, creates and returns a new Query that ends at the provided fields relative to the order of the query.
inherited
endAtDocument(DocumentSnapshot<Object?> documentSnapshot) Query<T>
Creates and returns a new Query that ends at the provided document (inclusive). The end position is relative to the order of the query. The document must contain all of the fields provided in the orderBy of this query.
inherited
endBefore(List<Object?> values) Query<T>
Takes a list of values, creates and returns a new Query that ends before the provided fields relative to the order of the query.
inherited
endBeforeDocument(DocumentSnapshot<Object?> documentSnapshot) Query<T>
Creates and returns a new Query that ends before the provided document snapshot (exclusive). The end position is relative to the order of the query. The document must contain all of the fields provided in the orderBy of this query.
inherited
get([GetOptions? options]) Future<QuerySnapshot<T>>
Fetch the documents for this query.
inherited
limit(int limit) Query<T>
Creates and returns a new Query that's additionally limited to only return up to the specified number of documents.
inherited
limitToLast(int limit) Query<T>
Creates and returns a new Query that only returns the last matching documents.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
orderBy(Object field, {bool descending = false}) Query<T>
Creates and returns a new Query that's additionally sorted by the specified field. The field may be a String representing a single field name or a FieldPath.
inherited
snapshots({bool includeMetadataChanges = false}) Stream<QuerySnapshot<T>>
Notifies of query results at this location.
inherited
startAfter(List<Object?> values) Query<T>
Takes a list of values, creates and returns a new Query that starts after the provided fields relative to the order of the query.
inherited
startAfterDocument(DocumentSnapshot<Object?> documentSnapshot) Query<T>
Creates and returns a new Query that starts after the provided document (exclusive). The starting position is relative to the order of the query. The documentSnapshot must contain all of the fields provided in the orderBy of this query.
inherited
startAt(List<Object?> values) Query<T>
Takes a list of values, creates and returns a new Query that starts at the provided fields relative to the order of the query.
inherited
startAtDocument(DocumentSnapshot<Object?> documentSnapshot) Query<T>
Creates and returns a new Query that starts at the provided document (inclusive). The starting position is relative to the order of the query. The document must contain all of the fields provided in the orderBy of this query.
inherited
toString() String
A string representation of this object.
inherited
where(Object field, {Object? isEqualTo, Object? isNotEqualTo, Object? isLessThan, Object? isLessThanOrEqualTo, Object? isGreaterThan, Object? isGreaterThanOrEqualTo, Object? arrayContains, List<Object?>? arrayContainsAny, List<Object?>? whereIn, List<Object?>? whereNotIn, bool? isNull}) Query<T>
Creates and returns a new Query with additional filter on specified field. field refers to a field in a document.
inherited
withConverter<R extends Object?>({required FromFirestore<R> fromFirestore, required ToFirestore<R> toFirestore}) CollectionReference<R>
Transforms a CollectionReference to manipulate a custom object instead of a Map<String, dynamic>.
override

Operators

operator ==(Object other) bool
The equality operator.
inherited