updateDocument method
Implementation
Future<void> updateDocument(
String path, fs.Document document, bool update) async {
document.name = path;
var request = UpdateDocumentRequest()..document = document;
if (update) {
var mask = DocumentMask();
document.fields.keys.forEach(mask.fieldPaths.add);
request.updateMask = mask;
}
await _client.updateDocument(request).catchError(_handleError);
}