CollectionRef constructor

CollectionRef(
  1. String id, [
  2. CollectionRef? parent,
  3. DocumentRef? delegate
])

Returns an instance using the default CollectionRef.

Implementation

factory CollectionRef(String id,
    [CollectionRef? parent, DocumentRef? delegate]) {
  final key = _buildPath(parent?.path, id, delegate?.id);
  final collectionRef =
      _cache.putIfAbsent(key, () => CollectionRef._(id, parent, delegate));
  collectionRef._conditions = null;
  return collectionRef;
}