getCollection method
Implementation
Future<Page<Document>> getCollection(
String path, int pageSize, String nextPageToken) async {
var request = ListDocumentsRequest()
..parent = path.substring(0, path.lastIndexOf('/'))
..collectionId = path.substring(path.lastIndexOf('/') + 1)
..pageSize = pageSize
..pageToken = nextPageToken;
var response =
await _client.listDocuments(request).catchError(_handleError);
var documents =
response.documents.map((rawDocument) => Document(this, rawDocument));
return Page(documents, response.nextPageToken);
}