toplevelParent property

ProtobufContainer? get toplevelParent

The top-level parent of this entity, or itself if it is a top-level entity.

Implementation

ProtobufContainer? get toplevelParent {
  if (parent == null) {
    return null;
  }
  if (parent is FileGenerator) {
    return this;
  }
  return parent?.toplevelParent;
}