createDocument method
Implementation
Future<Document> createDocument(
String path, String? documentId, fs.Document document) async {
var split = path.split('/');
var parent = split.sublist(0, split.length - 1).join('/');
var collectionId = split.last;
var request = CreateDocumentRequest()
..parent = parent
..collectionId = collectionId
..documentId = documentId ?? ''
..document = document;
var response =
await _client.createDocument(request).catchError(_handleError);
return Document(this, response);
}