runQuery method

Future<List<Document>> runQuery(
  1. StructuredQuery structuredQuery,
  2. String fullPath
)

Implementation

Future<List<Document>> runQuery(
    StructuredQuery structuredQuery, String fullPath) async {
  final runQuery = RunQueryRequest()
    ..structuredQuery = structuredQuery
    ..parent = fullPath.substring(0, fullPath.lastIndexOf('/'));
  final response = _client.runQuery(runQuery);
  return await response
      .where((event) => event.hasDocument())
      .map((event) => Document(this, event.document))
      .toList();
}