update method
WriteBatch
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.
Nested fields can be updated by providing dot-separated field path strings
or by providing FieldPath
objects.
The DocumentReference parameter is a reference to the document to be updated. Value must not be null.
The data
param is the Map 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 WriteBatch instance used for chaining method calls.
Implementation
WriteBatch update(
DocumentReference documentRef, {
Map<String, dynamic>? data,
List< /*String|FieldPath|dynamic*/ dynamic>? fieldsAndValues,
}) =>
WriteBatch.getInstance(_wrapUpdateFunctionCall(
jsObject, data, fieldsAndValues, documentRef));