parent property

Returns the parent DocumentReference of this collection or null.

If this collection is a root collection, null is returned.

Implementation

DocumentReference? get parent {
  DocumentReferencePlatform? _documentReferencePlatform = _delegate.parent;

  // Only subcollections have a parent
  if (_documentReferencePlatform == null) {
    return null;
  }

  return DocumentReference._(firestore, _documentReferencePlatform);
}