update method
update specific fields in your model call update by pass data
user.update(data: {
"first_name": "Mohamed",
"last_name": "Abdullah"
})
update specific model use update by pass docId
and data
FirestoreModel.use
Implementation
Future<void> update(
{String? docId, required Map<String, Object?> data}) async {
this.isUpdating = true;
return await _collectionReference
.doc(docId ?? this.docId)
.update(_dataMap(map: data))
.then((value) => this.isUpdating = false);
}