save method

Future<void> save({
  1. String? docId,
  2. SetOptions? setOptions,
})

make changes to your model and call save user.firstName = 'new firstname'; user.save()

Implementation

Future<void> save({String? docId, SetOptions? setOptions}) async {
  if ((docId ?? this.docId) != null) {
    this.isUpdating = true;
  }
  return await _collectionReference
      .doc(docId ?? this.docId)
      .set(_dataMap(), setOptions)
      .then((value) => this.isUpdating = false);
}