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. [...]
read-only
documentUri → String
The full URI for the document endpoint for this document.
read-only
hashCode → int
The hash code for this object. [...]
read-only, inherited
headers → Future<Map<String, String>>
read-only, inherited
id → int
The unique id of this document.
read-only
name → String
The name of this document.
read-only
path → String
The path to this document
read-only
runtimeType → Type
A representation of the runtime type of the object.
read-only, inherited
service CarpService
read / write, inherited

Methods

collection(String name) CollectionReference
Returns the reference of a collection contained inside of this document.
delete() → Future
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 non-existent method or property is accessed. [...]
inherited
rename(String name) → Future<DocumentSnapshot>
Renames the document referred to by this DocumentReference.
@Deprecated('Documents cannot be renamed in CANS.')
setData(Map<String, dynamic> data) → Future<DocumentSnapshot>
Writes to the document referred to by this DocumentReference. [...]
toString() → String
Returns 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