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 = '${parent?.path ?? ''}${delegate?.id ?? ''}/$id/';
  return _cache.putIfAbsent(key, () => CollectionRef._(id, parent, delegate));
}