CollectionRef constructor
CollectionRef(
- String id, [
- CollectionRef? parent,
- 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));
}