Transaction class

Transaction class which is created from a call to runTransaction().

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

delete(DocumentReference<Object?> documentReference) Transaction
Deletes the document referred to by the provided documentReference.
get<T extends Object?>(DocumentReference<T> documentReference) Future<DocumentSnapshot<T>>
Reads the document referenced by the provided DocumentReference.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
set<T>(DocumentReference<T> documentReference, T data, [SetOptions? options]) Transaction
Writes to the document referred to by the provided DocumentReference. If the document does not exist yet, it will be created. If you pass SetOptions, the provided data can be merged into the existing document.
toString() String
A string representation of this object.
inherited
update(DocumentReference<Object?> documentReference, Map<String, dynamic> data) Transaction
Updates fields in the document referred to by documentReference. The update will fail if applied to a document that does not exist.

Operators

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