getAll<T> method

Future<List<DocumentSnapshot<T>>> getAll<T>(
  1. List<DocumentReference<T>> documents, [
  2. ReadOptions? readOptions
])

Implementation

Future<List<DocumentSnapshot<T>>> getAll<T>(
  List<DocumentReference<T>> documents, [
  ReadOptions? readOptions,
]) async {
  if (documents.isEmpty) {
    throw ArgumentError.value(
      documents,
      'documents',
      'must not be an empty array.',
    );
  }

  final fieldMask = _parseFieldMask(readOptions);
  final tag = requestTag();

  final reader = _DocumentReader(
    firestore: this,
    documents: documents,
    transactionId: null,
    fieldMask: fieldMask,
  );

  return reader.get(tag);
}