update method
Transaction
update(
- DocumentReference documentRef, {
- Map<
String, dynamic> ? data, - List? fieldsAndValues,
Updates fields in the document referred to by this DocumentReference. The update will fail if applied to a document that does not exist. The value must not be null.
Nested fields can be updated by providing dot-separated field path strings
or by providing FieldPath
objects.
The data
param is the object containing all of the fields and values
to update.
The fieldsAndValues
param is the List alternating between fields
(as String or FieldPath
objects) and values.
Returns non-null Transaction instance used for chaining method calls.
Implementation
Transaction update(DocumentReference documentRef,
{Map<String, dynamic>? data,
List< /*String|FieldPath|dynamic*/ dynamic>? fieldsAndValues}) =>
Transaction.getInstance(
_wrapUpdateFunctionCall(jsObject, data, fieldsAndValues, documentRef),
);