updateDocument method
Updates a document in the specified collection
Implementation
@override
Future<void> updateDocument(
String collection,
String id,
Map<String, dynamic> data,
) async {
final documents = _documents;
final name = _documentPath(collection, id);
final fields = _encodeFields(data);
final document = firestore.Document(
name: name,
fields: fields,
);
await documents.patch(
document,
name,
updateMask_fieldPaths: fields.keys.toList(),
);
}