collection method

CollectionReference<Map<String, Object?>> collection(
  1. String collectionPath
)

Gets a CollectionReference to the subcollection at collectionPath, relative to this document.

Implementation

CollectionReference<Map<String, Object?>> collection(String collectionPath) {
  checkNonEmptyPath('DocumentReference.collection', collectionPath);
  return CollectionReference<Map<String, Object?>>.forPath(
    key.path.appendField(ResourcePath.fromString(collectionPath)),
    firestore,
  );
}