update method

void update(
  1. DocumentReference<Object?> documentRef,
  2. UpdateMap data, {
  3. Precondition? precondition,
})

Update fields of the document referred to by the provided DocumentReference. If the document doesn't yet exist, the update fails and the entire batch will be rejected.

Implementation

// TODO support update(ref, List<(FieldPath, value)>)
void update(
  DocumentReference<Object?> documentRef,
  UpdateMap data, {
  Precondition? precondition,
}) {
  _update(
    data: data,
    documentRef: documentRef,
    precondition: precondition,
  );
}