collection method
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,
);
}