collection method

CollectionReference collection(
  1. String collectionPath
)

Gets a CollectionReference for the specified Firestore path.

Implementation

CollectionReference collection(String collectionPath) {
  assert(collectionPath.isNotEmpty,
      'a collectionPath path must be a non-empty string');
  assert(!collectionPath.contains('//'),
      'a collection path must not contain "//"');
  assert(isValidCollectionPath(collectionPath),
      'a collection path must point to a valid collection.');

  return CollectionReference._(this, _delegate.collection(collectionPath));
}