DocumentReference class

A DocumentReference refers to a document in a CARP collection and can be used to write, read, or delete this document.

The document with the referenced id may or may not exist. If the document does not yet exist, it will be created. If the collection does not yet exist, it will be created.

A DocumentReference can also be used to create a CollectionReference to a sub-collection.

Inheritance

Properties

carpPath String
The full CARP web service path to this document.
no setter
documentUri String
The full URI for the document endpoint for this document.
no setter
hashCode int
The hash code for this object.
no setterinherited
headers Map<String, String>
no setterinherited
id int?
The unique id of this document. Returns null if the id is unknown.
no setter
name String
The name of this document.
no setter
path String
The path to this document
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
service CarpBaseService
getter/setter pairinherited

Methods

collection(String name) CollectionReference
Returns the reference of a collection contained inside of this document.
delete() Future<void>
Deletes the document referred to by this DocumentReference.
get() Future<DocumentSnapshot?>
Reads the document referenced by this DocumentReference.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
rename(String name) Future<DocumentSnapshot>
Renames the document referred to by this DocumentReference.
setData(Map<String, dynamic> data) Future<DocumentSnapshot>
Writes to the document referred to by this DocumentReference.
toString() String
A string representation of this object.
override
updateData(Map<String, dynamic> data) Future<DocumentSnapshot>
Updates fields in the document referred to by this DocumentReference.

Operators

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