update method
Updates the document in Firestore. If the document does not exist, this method does nothing. Warning: This method takes normal firestore data and does not use converters.
Implementation
Future<T> update(Map<String, dynamic> data) async {
if (_injectedPath == null) {
assert(
DogFirestoreEngine.instance.checkRootCollection<T>(),
"This entity is not a root "
"collection, and no parent has been set. Use withParent() to set the parent.");
}
var document = selfCollection.doc(id);
id = document.id; // Set the auto-generated ID that is created by using a null ID
await document.update(data);
return this as T;
}