parent property

For subcollections, parent returns the containing DocumentReferencePlatform.

For root collections, null is returned.

Implementation

DocumentReferencePlatform? get parent {
  String? parentPath = _pointer.parentPath();

  if (parentPath == null) {
    return null;
  }

  return firestore.doc(parentPath);
}